commit 0c4064febbb7239f06a1eed01bb8e00e6c09398f parent 44779a35dd9872847e32ad31f0143787ae02bbce Author: Antoine A <> Date: Fri, 4 Jul 2025 13:58:48 +0200 common: improve test tools download Diffstat:
| M | .gitignore | | | 5 | +++-- |
| M | script/prepare.sh | | | 26 | ++++++++++++++++---------- |
2 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/.gitignore b/.gitignore @@ -12,4 +12,5 @@ configure !/docs/tables /tmp taler.conf -*.mk -\ No newline at end of file +*.mk +tools +\ No newline at end of file diff --git a/script/prepare.sh b/script/prepare.sh @@ -18,29 +18,35 @@ trap cleanup EXIT BTC_VER="29.0" ETH_VER="1.14.11-f3c696fa" +FOUNDRY_VER="1.2.3" + +CALLER_DIR="$PWD" +cd $DIR + +rm -rfv $CALLER_DIR/tools +mkdir -pv $CALLER_DIR/tools echo "Ⅰ - Find installed postgres version" PG_VER=`pg_config --version | egrep -o '[0-9]{1,}' | head -1` echo "Found version $PG_VER" echo "Ⅱ - Install bitcoind version $BTC_VER" -cd $DIR ARCH=`uname -m` curl -L https://bitcoincore.org/bin/bitcoin-core-$BTC_VER/bitcoin-$BTC_VER-$ARCH-linux-gnu.tar.gz -o btc.tar.gz tar xvzf btc.tar.gz -rm -rfv ~/bitcoin -mkdir -pv ~/bitcoin -mv -v bitcoin-$BTC_VER/* ~/bitcoin +mv -v bitcoin-$BTC_VER/bin/* $CALLER_DIR/tools echo "Ⅲ - Install Go Ethereum (Geth) v$ETH_VER" -cd $DIR ARCH=`dpkg --print-architecture` curl -L https://gethstore.blob.core.windows.net/builds/geth-linux-$ARCH-$ETH_VER.tar.gz -o geth.tar.gz tar xvzf geth.tar.gz -rm -rfv ~/geth -mkdir -pv ~/geth -mv -v geth-linux-$ARCH-$ETH_VER/* ~/geth +mv -v geth-linux-$ARCH-$ETH_VER/geth $CALLER_DIR/tools + +echo "IV - Install Foundry v$FOUNDRY_VER" +curl -L https://github.com/foundry-rs/foundry/releases/download/v$FOUNDRY_VER/foundry_v${FOUNDRY_VER}_linux_$ARCH.tar.gz -o foundry.tar.gz +tar xvzf foundry.tar.gz +mv -v anvil chisel cast forge $CALLER_DIR/tools echo "Ⅴ - PATH" -echo "Add PATH=\"\$HOME/geth:\$HOME/bitcoin/bin:\$HOME/lnd:/usr/lib/postgresql/$PG_VER/bin:\$PATH\" to your bash profile" -\ No newline at end of file +echo "Add PATH=\"$CALLER_DIR/tools:/usr/lib/postgresql/$PG_VER/bin:\$PATH\" to your bash profile" +\ No newline at end of file