Skip to content

Commit

Permalink
Merge PR cosmos#2828: Reorganize install scripts & add ARM
Browse files Browse the repository at this point in the history
  • Loading branch information
zramsay authored and cwgoes committed Nov 28, 2018
1 parent 619b60f commit f7e22cb
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 4 deletions.
38 changes: 38 additions & 0 deletions scripts/install/install_sdk_arm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env bash

# change this to a specific release or branch
BRANCH=master
REPO=github.com/cosmos/cosmos-sdk

GO_VERSION=1.11.2

sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install -y make

# get and unpack golang
curl -O https://dl.google.com/go/go$GO_VERSION.linux-armv6l.tar.gz
tar -xvf go$GO_VERSION.linux-armv6l.tar.gz

# move go binary and add to path
sudo mv go /usr/local
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile

# create the go directory, set GOPATH, and put it on PATH
mkdir go
echo "export GOPATH=$HOME/go" >> ~/.profile
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile

source ~/.profile

# get the code and move into repo
go get $REPO
cd $GOPATH/src/$REPO

# build & install master
git checkout $BRANCH
LEDGER_ENABLED=false make get_tools
LEDGER_ENABLED=false make get_vendor_deps
LEDGER_ENABLED=false make install

source ~/.profile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

# change this to a specific release or branch
set BRANCH=master
set REPO=github.com/cosmos/cosmos-sdk

set GO_VERSION=1.11.2

sudo pkg update

Expand All @@ -22,8 +25,8 @@ sudo pkg install -y gmake
sudo pkg install -y git

# get and unpack golang
curl -O https://storage.googleapis.com/golang/go1.10.freebsd-amd64.tar.gz
tar -xvf go1.10.freebsd-amd64.tar.gz
curl -O https://storage.googleapis.com/golang/go$GO_VERSION.freebsd-amd64.tar.gz
tar -xvf go$GO_VERSION.freebsd-amd64.tar.gz

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile

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

source ~/.profile
Expand Down

0 comments on commit f7e22cb

Please sign in to comment.