Fix NDK download in Travis

Summary:
After about 500MB, Travis seems to kill the TLS connection. Could be a traffic
limit, could be a timeout. I've only seen this for their MacOS boxes. We're now
retrying a few times with curl, which seems to work.

Reviewed By: emilsjolander

Differential Revision: D6051024

fbshipit-source-id: feb73bfb9fd81b2a8b9b4d33d4e9f230a9899a66
This commit is contained in:
Pascal Hartig
2017-10-13 06:43:19 -07:00
committed by Facebook Github Bot
parent 208b70a93c
commit be94a5ef8d
2 changed files with 4 additions and 3 deletions

View File

@@ -1,8 +1,9 @@
function download() {
echo "Downloading '$1' to '$2' ..."
if hash curl 2>/dev/null; then
curl -L -o $2 $1
curl --retry 10 -L -o "$2" "$1"
elif hash wget 2>/dev/null; then
wget -O $2 $1
wget -O "$2" "$1"
else
echo >&2 "No supported download tool installed. Please get either wget or curl."
exit