From f0cc2f1061d3974237cbdebb9645bcf48d5becf7 Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 25 Jul 2017 16:41:55 -0700 Subject: [PATCH] Use wget and fallback to curl --- build.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index d102c8f905..ab590e62f1 100755 --- a/build.sh +++ b/build.sh @@ -99,12 +99,13 @@ __get_remote_file() { fi failed=false - if __machine_has curl ; then + if __machine_has wget; then + wget --tries 10 --quiet -O $local_path $remote_path || failed=true + fi + + if [ "$failed" = true ] && __machine_has curl; then + failed=false curl --retry 10 -sSL -f --create-dirs -o $local_path $remote_path || failed=true - elif __machine_has wget; then - wget --tries 10 -O $local_path $remote_path || failed=true - else - failed=true fi if [ "$failed" = true ]; then