2019-05-23 03:51:58 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -ev
|
2019-05-22 08:58:50 +03:00
|
|
|
|
2020-06-09 22:53:41 +03:00
|
|
|
export BITCOIND_VERSION=0.20.0
|
2019-05-22 08:58:50 +03:00
|
|
|
|
|
|
|
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind
|
2019-05-23 03:51:58 +03:00
|
|
|
then
|
|
|
|
echo "found cached bitcoind"
|
2019-05-22 08:58:50 +03:00
|
|
|
else
|
|
|
|
mkdir -p ~/bitcoin && \
|
2019-05-23 03:51:58 +03:00
|
|
|
pushd ~/bitcoin && \
|
|
|
|
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 && \
|
|
|
|
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \
|
|
|
|
popd
|
2019-05-22 08:58:50 +03:00
|
|
|
fi
|
|
|
|
|