File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -99,16 +99,19 @@ __get_remote_file() {
9999 return 0
100100 fi
101101
102- local succeeded =false
102+ local failed =false
103103 if __machine_has wget; then
104- wget --tries 10 --quiet -O " $local_path " " $remote_path " && succeeded=true
104+ wget --tries 10 --quiet -O " $local_path " " $remote_path " || failed=true
105+ else
106+ failed=true
105107 fi
106108
107- if [ " $succeeded " = false ] && __machine_has curl; then
108- curl --retry 10 -sSL -f --create-dirs -o " $local_path " " $remote_path " && succeeded=true
109+ if [ " $failed " = true ] && __machine_has curl; then
110+ failed=false
111+ curl --retry 10 -sSL -f --create-dirs -o " $local_path " " $remote_path " || failed=true
109112 fi
110113
111- if [ " $succeeded " = false ]; then
114+ if [ " $failed " = true ]; then
112115 __error " Download failed: $remote_path " 1>&2
113116 return 1
114117 fi
You can’t perform that action at this time.
0 commit comments