fetchurl: fix mirroring after ecf5a08831f18e3ae2fc857c70d60fc11f622dd6
This commit is contained in:
parent
f1572d37c3
commit
d6b7778753
@ -27,16 +27,17 @@ tryDownload() {
|
|||||||
header "trying $url"
|
header "trying $url"
|
||||||
local curlexit=18;
|
local curlexit=18;
|
||||||
|
|
||||||
|
success=
|
||||||
|
|
||||||
# if we get error code 18, resume partial download
|
# if we get error code 18, resume partial download
|
||||||
while [ $curlexit -eq 18 ]; do
|
while [ $curlexit -eq 18 ]; do
|
||||||
$curl -C - --fail "$url" --output "$downloadedFile"
|
# keep this inside an if statement, since on failure it doesn't abort the script
|
||||||
local curlexit=$?;
|
if $curl -C - --fail "$url" --output "$downloadedFile"; then
|
||||||
|
success=1
|
||||||
|
else
|
||||||
|
curlexit=$?;
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
success=
|
|
||||||
if [ $curlexit -eq 0 ]; then
|
|
||||||
success=1
|
|
||||||
fi
|
|
||||||
stopNest
|
stopNest
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user