From 08b36e1a59430c0f107f1dac5114285e1e30f9c1 Mon Sep 17 00:00:00 2001 From: DrBellPepper <65209543+mildlyhuman@users.noreply.github.com> Date: Wed, 28 Sep 2022 21:20:47 +0000 Subject: [PATCH] allow continue on download retries --- scripts/sharedFuncs.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/sharedFuncs.sh b/scripts/sharedFuncs.sh index 0151fa3..b9bcd04 100755 --- a/scripts/sharedFuncs.sh +++ b/scripts/sharedFuncs.sh @@ -183,6 +183,7 @@ function download_component() { show_message "downloading $4 ..." ariapkg=$(package_installed aria2c "summary") curlpkg=$(package_installed curl "summary") + wgetpkg=$(package_installed wget "summary") if [ "$ariapkg" == "true" ];then show_message "using aria2c to download $4" @@ -192,12 +193,12 @@ function download_component() { notify-send "Photoshop CC" "$4 download completed" -i "download" fi - elif [ "$curlpkg" == "true" ];then - show_message "using curl to download $4" - curl $3 -o $1 - else + elif [ "$wgetpkg" == "true" ];then show_message "using wget to download $4" - wget --no-check-certificate "$3" -P "$CACHE_PATH" + wget --no-check-certificate "$3" --continue --tries=0 -P "$CACHE_PATH" + else + show_message "using curl to download $4" + curl $3 --retry 999 --retry-all-errors -C - -o $1 if [ $? -eq 0 ];then notify-send "Photoshop CC" "$4 download completed" -i "download"