diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index 48828e888e..048bb44829 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -42,7 +42,11 @@ func_defined fetch || fetch() { for f in $files; do IFS=$OLDIFS read url filename <<< $(echo "$f") - run_nocd curl ${curlopts:-} "$url" -o "$filename" + if [ -f "$filename" ]; then + echo "$filename already exists" + else + run_nocd curl ${curlopts:-} "$url" -o "$filename" + fi case "$filename" in *.tar*|.tbz*|*.txz|*.tgz) run_nocd tar xf "$filename" @@ -57,7 +61,7 @@ func_defined fetch || fetch() { echo "Note: no case for file $filename." ;; esac - done + done if [ -d patches ]; then for f in patches/*; do run patch -p"$patchlevel" < "$f" diff --git a/Ports/gcc/package.sh b/Ports/gcc/package.sh index 9b9df8f307..3ffa7f8eb1 100755 --- a/Ports/gcc/package.sh +++ b/Ports/gcc/package.sh @@ -9,8 +9,12 @@ installopts="DESTDIR=$SERENITY_ROOT/Root install-gcc install-target-libgcc insta depends="binutils" fetch() { - read url filename <<< $(echo "$files") - run_nocd curl -O "$url" -o "$filename" + read url filename <<< $(echo "$files") + if [ -f "$filename" ]; then + echo "$filename already exists" + else + run_nocd curl -O "$url" -o "$filename" + fi run_nocd tar xf "$filename" run contrib/download_prerequisites for f in patches/*; do