@@ -172,7 +172,7 @@ get_current_os_name() {
172
172
return 0
173
173
elif [ " $uname " = " FreeBSD" ]; then
174
174
echo " freebsd"
175
- return 0
175
+ return 0
176
176
elif [ " $uname " = " Linux" ]; then
177
177
local linux_platform_name
178
178
linux_platform_name=" $( get_linux_platform_name) " || { echo " linux" && return 0 ; }
@@ -728,11 +728,12 @@ downloadcurl() {
728
728
# Append feed_credential as late as possible before calling curl to avoid logging feed_credential
729
729
remote_path=" ${remote_path}${feed_credential} "
730
730
731
+ local curl_options=" --retry 20 --retry-delay 2 --connect-timeout 15 -sSL -f --create-dirs "
731
732
local failed=false
732
733
if [ -z " $out_path " ]; then
733
- curl --retry 10 -sSL -f --create-dirs " $remote_path " || failed=true
734
+ curl $curl_options " $remote_path " || failed=true
734
735
else
735
- curl --retry 10 -sSL -f --create-dirs -o " $out_path " " $remote_path " || failed=true
736
+ curl $curl_options -o " $out_path " " $remote_path " || failed=true
736
737
fi
737
738
if [ " $failed " = true ]; then
738
739
say_verbose " Curl download failed"
@@ -748,12 +749,12 @@ downloadwget() {
748
749
749
750
# Append feed_credential as late as possible before calling wget to avoid logging feed_credential
750
751
remote_path=" ${remote_path}${feed_credential} "
751
-
752
+ local wget_options= " --tries 20 --waitretry 2 --connect-timeout 15 "
752
753
local failed=false
753
754
if [ -z " $out_path " ]; then
754
- wget -q --tries 10 -O - " $remote_path " || failed=true
755
+ wget -q $wget_options -O - " $remote_path " || failed=true
755
756
else
756
- wget --tries 10 -O " $out_path " " $remote_path " || failed=true
757
+ wget $wget_options -O " $out_path " " $remote_path " || failed=true
757
758
fi
758
759
if [ " $failed " = true ]; then
759
760
say_verbose " Wget download failed"
0 commit comments