build: download bitcoin binary distribution

This commit is contained in:
Braydon Fuller 2016-04-07 15:37:30 -04:00
parent c4649c9b13
commit 1fb552a972
2 changed files with 7 additions and 13 deletions

10
.gitignore vendored
View File

@ -1,12 +1,7 @@
node_modules/
node_modules/*
coverage/*
out/
out/*
build/
build/*
.lock-wscript
Makefile.gyp
*.swp
*.Makefile
*.target.gyp.mk
@ -19,15 +14,12 @@ Makefile.gyp
*.filters
*.user
*.project
test.js
**/*.dylib
**/*.so
**/*.old
**/*.files
**/*.config
**/*.creator
libbitcoind
libbitcoind*
libbitcoind.includes
*.log
.DS_Store
bin/bitcoin*

View File

@ -3,8 +3,9 @@
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
platform=`uname -a | awk '{print tolower($1)}'`
arch=`uname -m`
version="0.12.0-bitcore"
url="https://github.com/"
version="0.12.0"
url="https://github.com/braydonf/bitcoin/releases/download"
tag="v0.12.0-bitcore-beta1"
cd "${root_dir}/bin"
@ -21,7 +22,7 @@ else
exit -1
fi
binary_url="${url}/${tarball_name}"
binary_url="${url}/${tag}/${tarball_name}"
echo "Downloading bitcoin: ${binary_url}"
@ -35,7 +36,7 @@ fi
if test $? -eq 0; then
if [ "${is_curl}" = true ]; then
curl $binary_url > $tarball_name
curl -L $binary_url > $tarball_name
else
wget $binary_url
fi
@ -43,6 +44,7 @@ if test $? -eq 0; then
echo "Unpacking bitcoin distribution"
tar -xvzf $tarball_name
if test $? -eq 0; then
ln -s "bitcoin-${version}/bin/bitcoind"
exit 0
fi
fi