build: download bitcoin binary distribution
This commit is contained in:
parent
c4649c9b13
commit
1fb552a972
|
@ -1,12 +1,7 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
node_modules/*
|
node_modules/*
|
||||||
coverage/*
|
coverage/*
|
||||||
out/
|
|
||||||
out/*
|
|
||||||
build/
|
|
||||||
build/*
|
|
||||||
.lock-wscript
|
.lock-wscript
|
||||||
Makefile.gyp
|
|
||||||
*.swp
|
*.swp
|
||||||
*.Makefile
|
*.Makefile
|
||||||
*.target.gyp.mk
|
*.target.gyp.mk
|
||||||
|
@ -19,15 +14,12 @@ Makefile.gyp
|
||||||
*.filters
|
*.filters
|
||||||
*.user
|
*.user
|
||||||
*.project
|
*.project
|
||||||
test.js
|
|
||||||
**/*.dylib
|
**/*.dylib
|
||||||
**/*.so
|
**/*.so
|
||||||
**/*.old
|
**/*.old
|
||||||
**/*.files
|
**/*.files
|
||||||
**/*.config
|
**/*.config
|
||||||
**/*.creator
|
**/*.creator
|
||||||
libbitcoind
|
|
||||||
libbitcoind*
|
|
||||||
libbitcoind.includes
|
|
||||||
*.log
|
*.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
bin/bitcoin*
|
|
@ -3,8 +3,9 @@
|
||||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
||||||
platform=`uname -a | awk '{print tolower($1)}'`
|
platform=`uname -a | awk '{print tolower($1)}'`
|
||||||
arch=`uname -m`
|
arch=`uname -m`
|
||||||
version="0.12.0-bitcore"
|
version="0.12.0"
|
||||||
url="https://github.com/"
|
url="https://github.com/braydonf/bitcoin/releases/download"
|
||||||
|
tag="v0.12.0-bitcore-beta1"
|
||||||
|
|
||||||
cd "${root_dir}/bin"
|
cd "${root_dir}/bin"
|
||||||
|
|
||||||
|
@ -21,7 +22,7 @@ else
|
||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
binary_url="${url}/${tarball_name}"
|
binary_url="${url}/${tag}/${tarball_name}"
|
||||||
|
|
||||||
echo "Downloading bitcoin: ${binary_url}"
|
echo "Downloading bitcoin: ${binary_url}"
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ fi
|
||||||
|
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
if [ "${is_curl}" = true ]; then
|
if [ "${is_curl}" = true ]; then
|
||||||
curl $binary_url > $tarball_name
|
curl -L $binary_url > $tarball_name
|
||||||
else
|
else
|
||||||
wget $binary_url
|
wget $binary_url
|
||||||
fi
|
fi
|
||||||
|
@ -43,6 +44,7 @@ if test $? -eq 0; then
|
||||||
echo "Unpacking bitcoin distribution"
|
echo "Unpacking bitcoin distribution"
|
||||||
tar -xvzf $tarball_name
|
tar -xvzf $tarball_name
|
||||||
if test $? -eq 0; then
|
if test $? -eq 0; then
|
||||||
|
ln -s "bitcoin-${version}/bin/bitcoind"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue