Merge PR #2828: Reorganize install scripts & add ARM
This commit is contained in:
parent
619b60f207
commit
f7e22cb4d3
|
@ -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
|
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
@ -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
|
Loading…
Reference in New Issue