-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sh
52 lines (41 loc) · 1.39 KB
/
init.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
#!/bin/bash
echo "updating linux"
sudo apt-get update
sudo apt -y install curl unzip make git
echo "installing go"
curl -O https://dl.google.com/go/go1.10.2.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.10.2.linux-amd64.tar.gz
echo "sourcing go"
echo -e "\nexport PATH=\$PATH:/usr/local/go/bin:~/gopath/bin" >> ~/.bash_profile
. ~/.bash_profile
echo "installing protobuff"
export PROTOBUF_VERSION=3.5.1
curl -OL https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
sudo unzip -o protoc-${PROTOBUF_VERSION}-linux-x86_64.zip -d /usr/local
sudo chmod +x /usr/local/bin/protoc
echo "installing go deps"
mkdir -p ~/gopath/bin
export GOPATH=~/gopath
curl https://raw.githubusercontent.com/golang/dep/master/install.sh > install.sh
. ./install.sh
echo "installing loom"
curl -OL https://storage.googleapis.com/private.delegatecall.com/loom/linux/build-209/loom
chmod +x loom
export GOPATH=~/gopath
export PATH=$GOPATH/bin:$PATH
./loom spin weave-blueprint
cd blueprint
export GOPATH=$GOPATH:`pwd`
make deps
make
cd build
../../loom init
cp ../genesis.example.json genesis.json
# echo "generating blueprint dapp keys"
# ../../loom genkey -k priv_key -a pub_key
# touch ../../loom.yml
# echo 'QueryServerHost: "tcp://0.0.0.0:9999"' >> ../../loom.yml
# echo "retrieving loom public key"
# ../../loom nodekey
echo "running loom blockchain"
../../loom run