Merge #14883: add --retry 5 to curl opts in install_db4.sh

522b80b33f add `--retry 5` to curl opts in install_db4.sh (qubenix)

Pull request description:

  I ran into some network issue that caused the clang patch to not download and the script exited. A retry would have solved it. The fallback choice, `wget`, has a default 20 retries.

  I chose 5 retries because `curl` backs of after each try, starting at one second and doubling each time. 5 retries means that worst case scenario would be a total of 31 seconds waiting between attempts. IMO that should be enough tries if internet is working, but not too much if internet is not working.

Tree-SHA512: ff48e1f8a9d39b9c6fabc616223974f46fadc5a1b30793cdaaf5ea4ce79f7c76efd259bfa9e81a5a7a7cff60b7133d89448faa3f86cc2f9b0c5ac9adf8dd2a9b
This commit is contained in:
MarcoFalke 2018-12-11 13:43:18 -05:00
commit d680ef9381
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

@ -51,7 +51,7 @@ http_get() {
if [ -f "${2}" ]; then
echo "File ${2} already exists; not downloading again"
elif check_exists curl; then
curl --insecure "${1}" -o "${2}"
curl --insecure --retry 5 "${1}" -o "${2}"
else
wget --no-check-certificate "${1}" -O "${2}"
fi