|
|
|
|
@ -10,7 +10,7 @@ fi
|
|
|
|
|
if [[ "$(uname)" == "Linux" ]]; then |
|
|
|
|
platform="x86_64-linux-gnu" |
|
|
|
|
elif [[ "$(uname)" == "Darwin" ]]; then |
|
|
|
|
if [[ $BITCOIND_VERSION > 23.0 || $BITCOIND_VERSION == 23.0 ]]; then |
|
|
|
|
if [[ $(echo "$BITCOIND_VERSION > 23.0" | bc) == 1 || $(echo "$BITCOIND_VERSION == 23.0" | bc) == 1 ]]; then |
|
|
|
|
platform="x86_64-apple-darwin" |
|
|
|
|
else |
|
|
|
|
platform="osx64" |
|
|
|
|
@ -20,16 +20,16 @@ else
|
|
|
|
|
exit 1 |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
if sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind |
|
|
|
|
if sudo cp "$HOME/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind" /usr/local/bin/bitcoind |
|
|
|
|
then |
|
|
|
|
echo "found cached bitcoind" |
|
|
|
|
sudo cp ~/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli |
|
|
|
|
sudo cp "$HOME/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli" /usr/local/bin/bitcoin-cli |
|
|
|
|
else |
|
|
|
|
mkdir -p ~/bitcoin && \ |
|
|
|
|
pushd ~/bitcoin && \ |
|
|
|
|
wget https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \ |
|
|
|
|
tar xvfz bitcoin-$BITCOIND_VERSION-$platform.tar.gz && \ |
|
|
|
|
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoind /usr/local/bin/bitcoind && \ |
|
|
|
|
sudo cp ./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli /usr/local/bin/bitcoin-cli && \ |
|
|
|
|
wget "https://bitcoincore.org/bin/bitcoin-core-$BITCOIND_VERSION/bitcoin-$BITCOIND_VERSION-$platform.tar.gz" && \ |
|
|
|
|
tar xvfz "bitcoin-$BITCOIND_VERSION-$platform.tar.gz" && \ |
|
|
|
|
sudo cp "./bitcoin-$BITCOIND_VERSION/bin/bitcoind" /usr/local/bin/bitcoind && \ |
|
|
|
|
sudo cp "./bitcoin-$BITCOIND_VERSION/bin/bitcoin-cli" /usr/local/bin/bitcoin-cli && \ |
|
|
|
|
popd |
|
|
|
|
fi |
|
|
|
|
|