2022-12-22 15:38:45 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
DIRNAME="bitcoin-${BITCOIN_VERSION}"
|
|
|
|
EDIRNAME="elements-${ELEMENTS_VERSION}"
|
2023-02-07 12:27:39 -05:00
|
|
|
FILENAME="${DIRNAME}-x86_64-linux-gnu.tar.gz"
|
2023-02-06 16:57:58 -05:00
|
|
|
EFILENAME="${EDIRNAME}-x86_64-linux-gnu.tar.gz"
|
2022-12-22 15:38:45 +01:00
|
|
|
|
|
|
|
cd /tmp/
|
|
|
|
|
2023-09-13 18:36:17 +02:00
|
|
|
# Since we inadvertently broke `elementsd` support in the past we only
|
|
|
|
# want to download and enable the daemon that is actually going to be
|
|
|
|
# used when running in CI. Otherwise we could end up accidentally
|
|
|
|
# testing against `bitcoind` but still believe that we ran against
|
|
|
|
# `elementsd`.
|
|
|
|
if [ "$TEST_NETWORK" = "liquid-regtest" ]; then
|
|
|
|
wget "https://github.com/ElementsProject/elements/releases/download/elements-${ELEMENTS_VERSION}/${EFILENAME}"
|
|
|
|
tar -xf "${EFILENAME}"
|
|
|
|
sudo mv "${EDIRNAME}"/bin/* "/usr/local/bin"
|
|
|
|
rm -rf "${EFILENAME}" "${EDIRNAME}"
|
|
|
|
else
|
|
|
|
wget "https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${FILENAME}"
|
|
|
|
tar -xf "${FILENAME}"
|
|
|
|
sudo mv "${DIRNAME}"/bin/* "/usr/local/bin"
|
|
|
|
rm -rf "${FILENAME}" "${DIRNAME}"
|
|
|
|
fi
|
2022-12-22 15:38:45 +01:00
|
|
|
|