fetchurl: fix mirroring after ecf5a08831

This commit is contained in:
Domen Kožar 2014-10-05 09:51:57 +02:00
parent f1572d37c3
commit d6b7778753

View File

@ -27,16 +27,17 @@ tryDownload() {
header "trying $url"
local curlexit=18;
success=
# if we get error code 18, resume partial download
while [ $curlexit -eq 18 ]; do
$curl -C - --fail "$url" --output "$downloadedFile"
local curlexit=$?;
# keep this inside an if statement, since on failure it doesn't abort the script
if $curl -C - --fail "$url" --output "$downloadedFile"; then
success=1
else
curlexit=$?;
fi
done
success=
if [ $curlexit -eq 0 ]; then
success=1
fi
stopNest
}