mirror of
https://github.com/JoinMarket-Org/joinmarket-clientserver.git
synced 2026-08-16 13:01:17 +02:00
Security vulnerability has been disclosed for versions older than 24.0.1, which are also currently EOL. https://bitcoincore.org/en/2024/09/18/disclose-headers-oom/
31 lines
979 B
Bash
Executable file
31 lines
979 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -ev
|
|
|
|
if [[ -z "$BITCOIND_VERSION" ]]; then
|
|
echo "BITCOIND_VERSION must be set"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ "$(uname)" == "Linux" ]]; then
|
|
platform="x86_64-linux-gnu"
|
|
elif [[ "$(uname)" == "Darwin" ]]; then
|
|
platform="x86_64-apple-darwin"
|
|
else
|
|
echo "Unsupported platform: $(uname)"
|
|
exit 1
|
|
fi
|
|
|
|
if sudo cp "$HOME/bitcoin/bitcoin-$BITCOIND_VERSION/bin/bitcoind" /usr/local/bin/bitcoind
|
|
then
|
|
echo "found cached bitcoind"
|
|
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 && \
|
|
popd
|
|
fi
|