Lack of Curl

- Added a check for curl in the install script, if no curl, then use wget.
This commit is contained in:
Chris Kleeschulte 2015-08-17 14:03:04 -04:00
parent 5f64d12972
commit 2d4a2b0bfd
2 changed files with 13 additions and 3 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

View File

@ -2,7 +2,7 @@
"name": "bitcore-node",
"description": "Full node with extended capabilities using Bitcore and Bitcoin Core",
"author": "BitPay <dev@bitpay.com>",
"version": "0.2.0-beta.2",
"version": "0.2.0-dev",
"main": "./index.js",
"repository": "git://github.com/bitpay/bitcore-node.git",
"homepage": "https://github.com/bitpay/bitcore-node.js",