node-distro/docker/download_bitcoin_cli.sh
Anatolios Laskaris af31412d6f
chore: Prepare for multiplatform build (#148)
* Prepare for multiarch

* Fix

* Fix

* Fix

* Move some code to scripts

* Cleanup

* Run chmod

* Typo

* Fix

* Fixes

* Typo

* Install npm

* Fix

* Cleanup

* Fix

* Fix?

* Updates
2023-06-05 18:05:24 +03:00

16 lines
388 B
Bash
Executable File

#! /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"