Skip to content

Commit f7e22cb

Browse files
zramsaycwgoes
authored andcommitted
Merge PR #2828: Reorganize install scripts & add ARM
1 parent 619b60f commit f7e22cb

File tree

3 files changed

+44
-4
lines changed

3 files changed

+44
-4
lines changed

scripts/install/install_sdk_arm.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env bash
2+
3+
# change this to a specific release or branch
4+
BRANCH=master
5+
REPO=github.com/cosmos/cosmos-sdk
6+
7+
GO_VERSION=1.11.2
8+
9+
sudo apt-get update -y
10+
sudo apt-get upgrade -y
11+
sudo apt-get install -y make
12+
13+
# get and unpack golang
14+
curl -O https://dl.google.com/go/go$GO_VERSION.linux-armv6l.tar.gz
15+
tar -xvf go$GO_VERSION.linux-armv6l.tar.gz
16+
17+
# move go binary and add to path
18+
sudo mv go /usr/local
19+
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
20+
21+
# create the go directory, set GOPATH, and put it on PATH
22+
mkdir go
23+
echo "export GOPATH=$HOME/go" >> ~/.profile
24+
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
25+
26+
source ~/.profile
27+
28+
# get the code and move into repo
29+
go get $REPO
30+
cd $GOPATH/src/$REPO
31+
32+
# build & install master
33+
git checkout $BRANCH
34+
LEDGER_ENABLED=false make get_tools
35+
LEDGER_ENABLED=false make get_vendor_deps
36+
LEDGER_ENABLED=false make install
37+
38+
source ~/.profile

scripts/install_sdk_bsd.sh renamed to scripts/install/install_sdk_bsd.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515
# change this to a specific release or branch
1616
set BRANCH=master
17+
set REPO=github.com/cosmos/cosmos-sdk
18+
19+
set GO_VERSION=1.11.2
1720

1821
sudo pkg update
1922

@@ -22,8 +25,8 @@ sudo pkg install -y gmake
2225
sudo pkg install -y git
2326

2427
# get and unpack golang
25-
curl -O https://storage.googleapis.com/golang/go1.10.freebsd-amd64.tar.gz
26-
tar -xvf go1.10.freebsd-amd64.tar.gz
28+
curl -O https://storage.googleapis.com/golang/go$GO_VERSION.freebsd-amd64.tar.gz
29+
tar -xvf go$GO_VERSION.freebsd-amd64.tar.gz
2730

2831
# move go binary and add to path
2932
mv go /usr/local
@@ -39,7 +42,6 @@ echo "set path=($path $GOPATH/bin)" >> ~/.tcshrc
3942
source ~/.tcshrc
4043

4144
# get the code and move into repo
42-
set REPO=github.com/cosmos/cosmos-sdk
4345
go get $REPO
4446
cd $GOPATH/src/$REPO
4547

scripts/install_sdk_ubuntu.sh renamed to scripts/install/install_sdk_ubuntu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
2323

2424
# create the go directory, set GOPATH, and put it on PATH
2525
mkdir go
26-
echo "export GOPATH=/root/go" >> ~/.profile
26+
echo "export GOPATH=$HOME/go" >> ~/.profile
2727
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
2828

2929
source ~/.profile

0 commit comments

Comments
 (0)