Merge pull request #6332 from a-robinson/bust

Don't ever give up on retrying downloads in the GCE download-or-bust function
This commit is contained in:
Zach Loafman 2015-04-01 17:44:12 -07:00
commit b3413eaa59

View File

@ -104,9 +104,8 @@ download-or-bust() {
local -r url="$1"
local -r file="${url##*/}"
rm -f "$file"
until [[ -e "${1##*/}" ]]; do
echo "Downloading file ($1)"
curl --ipv4 -Lo "$file" --connect-timeout 20 --retry 6 --retry-delay 10 "$1"
until curl --ipv4 -Lo "$file" --connect-timeout 20 --retry 6 --retry-delay 10 "$1"; do
echo "Failed to download file ($1). Retrying."
done
}