From d070e8f7f34786553234191b3d39b4e89c40af13 Mon Sep 17 00:00:00 2001 From: 4cyber Date: Tue, 13 Dec 2022 10:13:18 +0100 Subject: [PATCH] Update SharedFuncs.sh Change default to wget, this will fix the download error cause wget will try to resume it --- scripts/sharedFuncs.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/sharedFuncs.sh b/scripts/sharedFuncs.sh index 0151fa3..7ce9ddd 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,16 +193,16 @@ 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" if [ $? -eq 0 ];then notify-send "Photoshop CC" "$4 download completed" -i "download" fi + else + show_message "using curl to download $4" + curl $3 -o $1 fi ((tout++)) fi