node-distro/docker/download_bitcoin_cli.sh

16 lines
388 B
Bash
Raw Normal View History

#! /usr/bin/env sh
case "$TARGETPLATFORM" in
'linux/amd64')
ARCHIVE="bitcoin-${BITCOIN_CLI_VERSION}-x86_64-linux-gnu.tar.gz"
;;
'linux/arm64')
ARCHIVE="bitcoin-${BITCOIN_CLI_VERSION}-aarch64-linux-gnu.tar.gz"
;;
esac
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_CLI_VERSION}/$ARCHIVE"
grep " $ARCHIVE\$" SHA256SUMS | sha256sum -c -
tar -xzf "$ARCHIVE"
rm "$ARCHIVE"