Update SharedFuncs.sh

Change default to wget, this will fix the download error cause wget will try to resume it
This commit is contained in:
4cyber 2022-12-13 10:13:18 +01:00 committed by GitHub
parent 5f8f0adcdd
commit d070e8f7f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 4 deletions

View File

@ -183,6 +183,7 @@ function download_component() {
show_message "downloading $4 ..." show_message "downloading $4 ..."
ariapkg=$(package_installed aria2c "summary") ariapkg=$(package_installed aria2c "summary")
curlpkg=$(package_installed curl "summary") curlpkg=$(package_installed curl "summary")
wgetpkg=$(package_installed wget "summary")
if [ "$ariapkg" == "true" ];then if [ "$ariapkg" == "true" ];then
show_message "using aria2c to download $4" show_message "using aria2c to download $4"
@ -192,16 +193,16 @@ function download_component() {
notify-send "Photoshop CC" "$4 download completed" -i "download" notify-send "Photoshop CC" "$4 download completed" -i "download"
fi fi
elif [ "$curlpkg" == "true" ];then elif [ "$wgetpkg" == "true" ];then
show_message "using curl to download $4"
curl $3 -o $1
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"
if [ $? -eq 0 ];then if [ $? -eq 0 ];then
notify-send "Photoshop CC" "$4 download completed" -i "download" notify-send "Photoshop CC" "$4 download completed" -i "download"
fi fi
else
show_message "using curl to download $4"
curl $3 -o $1
fi fi
((tout++)) ((tout++))
fi fi