-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup-dev.sh
executable file
·66 lines (52 loc) · 3.33 KB
/
setup-dev.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
echo '
.+%-
.*@@@@%=
.+@@@@@@@@%-
@@@@@+:#@@@@+ :::::::: .::::. .: .:. .::: .:::::::. :: .:::::::. :::. :::.
@@@= .#@@+ .**#@@**+ *@%*#@@- #@. -@- .%@*+#@--**%@%**: @@ +@%*****: =@%+*#% *@*+*%*
@+ ----: :#+ :@# *@- .@@ #@. -@- =@* +@- @@ +@= @@- .@%.
:-. :@# *@+:-#@* #@. -@- +%@%+: +@- @@ +@%####= .*@@#+. -#@@*-
:#. =+. :@# *@#*%@* *@: =@- :#@+ +@- @@ +@+..... .-%@. .+@%
-%@@. +@@+. :@# *@- *@* :@@=--+@# +=-:-#@= +@- @@-----: +@*-----:.*=::-%@ -+-::+@#
:#@@@@. +@@@@+. .+= -+. -+- -+**+: .=+**=. -+: +++++++- -+++++++- -=**+= .-+**+:
#@@@@@@. +@@@@@@-
=@@@@@@. +@@@@@@ :::. .::: . . ::::. :: .: .::::::: :::::::. ::::.
@@@@@@. +@@@@@+ -%@#**%% .*@#**#@#- =#. .%- -@%**%@+ #@. +@--**%@#**:.@%*****- #@#*#@%-
=@@@@@. +@@@@@ +@* -@#. *@+ =@@= =@@- -@+ %@:#@. +@- =@- .@+ #@. :@@
%@@@@. +@@@@+ @@. %@: %@.=@#@# #@*@- -@#--+@% #@. +@- =@- .@@%%%%% #@=--#@+
:%@@@. +@@@* %@- *@+ :@% =@=.#@+@# -@- -@%++=: #@: *@- =@- .@* #@*+%@=
=@@. +@#: *@*-::=* +@%=-:=#@# =@= +@= -@- -@+ :@%=:-*@# =@- .@#:::::. #@. *@+
+. -- .=+**+- -+**+=. -*: :*: :+- -+**+: -*: .*******= =*. =*:
.-: -:.
.-++=--:.....-=-=+=:
'
echo "\n----|Installing Docker...\n"
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
echo "\n----|Installing dependencies...\n"
sudo apt-get -y install build-essential libtool autotools-dev autoconf libssl-dev libboost-all-dev
echo "\n----|Installing Bitcoin Core...\n"
sudo add-apt-repository -y ppa:luke-jr/bitcoincore
sudo apt-get update
sudo apt-get -y install bitcoin-qt bitcoin-tx bitcoind
bitcoin-cli -rpcuser=trustless -rpcpassword=notrespassing stop
mkdir ./bitcoin
CONFIG_BTCD=$(cat <<EOF
rpcuser=trustless
rpcpassword=notrespassing
rpcallowip=0.0.0.0/0
regtest=1
server=1
rest=1
[regtest]
rpcport=8332
EOF
)
printf "$CONFIG_BTCD" > ./bitcoin/bitcoin.conf
bitcoind -datadir=./bitcoin --daemon
echo "\n----|Cloning Repos...\n"
git clone https://github.com/TrustlessComputer/trustless-node-easy.git ./trustless-node
cd ./trustless-node
echo "\n----|Starting Trustless node...\n"
docker compose -f docker-compose-dev.yml up -d