blob: 3de725f0f21cb98fa73181f6cc53433e76cb37cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/bin/bash
## Install required dependencies to run tests without sudo
set -eu
DIR=$(mktemp -d)
function cleanup() {
for n in `jobs -p`; do
kill $n 2> /dev/null || true
done
rm -rf $DIR 2> /dev/null
wait
}
trap cleanup EXIT
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 26.0"
cd $DIR
curl -L https://bitcoincore.org/bin/bitcoin-core-26.0/bitcoin-26.0-x86_64-linux-gnu.tar.gz -o btc.tar.gz
tar xvzf btc.tar.gz
rm -rfv ~/bitcoin
mkdir -pv ~/bitcoin
mv -v bitcoin-26.0/* ~/bitcoin
echo "Ⅲ - Install Go Ethereum (Geth) v1.13.11"
cd $DIR
curl -L https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.13.11-8f7eb9cc.tar.gz -o geth.tar.gz
tar xvzf geth.tar.gz
rm -rfv ~/geth
mkdir -pv ~/geth
mv -v geth-linux-amd64-1.13.11-8f7eb9cc/* ~/geth
echo "Ⅴ - PATH"
echo "Add PATH=\"\$HOME/geth:\$HOME/bitcoin/bin:\$HOME/lnd:/usr/lib/postgresql/$PG_VER/bin:\$PATH\" to your bash profile"
|