scripts/install_bitcoind: fix initial install

This commit is contained in:
Conner Fromknecht 2019-05-22 17:51:58 -07:00
parent 0afc70ec67
commit b34150144d
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7

@ -1,16 +1,18 @@
#!/usr/env bash #!/usr/bin/env bash
set -ev
export BITCOIND_VERSION=0.17.1 export BITCOIND_VERSION=0.17.1
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
then echo "bitcoind installed" then
echo "found cached bitcoind"
else else
mkdir -p ~/bitcoin && \ mkdir -p ~/bitcoin && \
pushd ~/bitcoin && \ pushd ~/bitcoin && \
wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \ wget https://bitcoin.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \ tar xvfz bitcoin-$BITCOIND_VERSION-x86_64-linux-gnu.tar.gz && \
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
/usr/local/bin/bitcoind && \ popd
popd
fi fi