File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -99,17 +99,16 @@ __get_remote_file() {
9999 return 0
100100 fi
101101
102- failed =false
102+ local succeeded =false
103103 if __machine_has wget; then
104- wget --tries 10 --quiet -O " $local_path " " $remote_path " || failed =true
104+ wget --tries 10 --quiet -O " $local_path " " $remote_path " && succeeded =true
105105 fi
106106
107- if [ " $failed " = true ] && __machine_has curl; then
108- failed=false
109- curl --retry 10 -sSL -f --create-dirs -o " $local_path " " $remote_path " || failed=true
107+ if [ " $succeeded " = false ] && __machine_has curl; then
108+ curl --retry 10 -sSL -f --create-dirs -o " $local_path " " $remote_path " && succeeded=true
110109 fi
111110
112- if [ " $failed " = true ]; then
111+ if [ " $succeeded " = false ]; then
113112 __error " Download failed: $remote_path " 1>&2
114113 return 1
115114 fi
You can’t perform that action at this time.
0 commit comments