Merge PR #2803: Update ubuntu install script

This commit is contained in:
Christopher Goes 2018-11-15 12:00:49 +01:00 committed by GitHub
commit 7f68cee3d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,39 +3,39 @@
# XXX: this script is intended to be run from
# a fresh Digital Ocean droplet with Ubuntu
# upon its completion, you must either reset
# your terminal or run `source ~/.profile`
# 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://storage.googleapis.com/golang/go1.10.linux-amd64.tar.gz
tar -xvf go1.10.linux-amd64.tar.gz
curl -O https://dl.google.com/go/go$GO_VERSION.linux-amd64.tar.gz
tar -xvf go$GO_VERSION.linux-amd64.tar.gz
# move go binary and add to path
mv go /usr/local
echo "export PATH=\$PATH:/usr/local/go/bin" >> ~/.profile
# create the goApps directory, set GOPATH, and put it on PATH
mkdir goApps
echo "export GOPATH=/root/goApps" >> ~/.profile
# create the go directory, set GOPATH, and put it on PATH
mkdir go
echo "export GOPATH=/root/go" >> ~/.profile
echo "export PATH=\$PATH:\$GOPATH/bin" >> ~/.profile
source ~/.profile
# get the code and move into repo
REPO=github.com/cosmos/cosmos-sdk
go get $REPO
cd $GOPATH/src/$REPO
# build & install master
git checkout $BRANCH
make get_tools
make get_vendor_deps
make install
make install_examples
LEDGER_ENABLED=false make get_tools
LEDGER_ENABLED=false make get_vendor_deps
LEDGER_ENABLED=false make install
source ~/.profile