Improve download_component to allow for resuming failed downloads
This commit is contained in:
parent
5f8f0adcdd
commit
192353f99b
|
@ -194,7 +194,17 @@ function download_component() {
|
||||||
|
|
||||||
elif [ "$curlpkg" == "true" ]; then
|
elif [ "$curlpkg" == "true" ]; then
|
||||||
show_message "using curl to download $4"
|
show_message "using curl to download $4"
|
||||||
curl $3 -o $1
|
while true; do
|
||||||
|
curl -C - --progress-bar -o $1 $3
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
notify-send "Photoshop CC" "$4 download completed" -i "download"
|
||||||
|
break
|
||||||
|
else
|
||||||
|
show_message "Download failed, waiting before retrying..."
|
||||||
|
sleep $((tout*5))
|
||||||
|
((tout++))
|
||||||
|
fi
|
||||||
|
done
|
||||||
else
|
else
|
||||||
show_message "using wget to download $4"
|
show_message "using wget to download $4"
|
||||||
wget --no-check-certificate "$3" -P "$CACHE_PATH"
|
wget --no-check-certificate "$3" -P "$CACHE_PATH"
|
||||||
|
|
Loading…
Reference in New Issue