Merge pull request #125 from kleetus/no_curl

No curl
This commit is contained in:
Braydon Fuller 2015-08-17 15:36:05 -04:00
commit 261164d46d
1 changed files with 12 additions and 2 deletions

View File

@ -10,10 +10,20 @@ binary_url="https://${bucket_name}.s3.amazonaws.com/${tarball_name}"
echo "Downloading binary: ${binary_url}"
curl --fail -I $binary_url
is_curl=true
if hash curl 2>/dev/null; then
curl --fail -I $binary_url
else
is_curl=false
wget --server-response --spider $binary_url
fi
if test $? -eq 0; then
curl $binary_url > $tarball_name
if [ "${is_curl}" = true ]; then
curl $binary_url > $tarball_name
else
wget $binary_url
fi
if test -e "${tarball_name}"; then
echo "Unpacking binary distribution"
tar -xvzf $tarball_name