tools: improve demo_setup.sh

1. Account for the fact that go can be already in path.
2. Unset GOROOT in case it is set already.
3. export variables (not sure how it worked for me).
This commit is contained in:
Dmitry Vyukov 2018-04-07 12:33:23 +02:00
parent d613535f94
commit 54907ddb1e

View File

@ -21,10 +21,11 @@
set -eux set -eux
DIR=$PWD export DIR=$PWD
PATH=$PATH:$DIR/go/bin export PATH=$DIR/go/bin:$PATH
GOPATH=$DIR/gopath export GOPATH=$DIR/gopath
NVM=$(((`free -g | grep "Mem:" | awk '{print $2}'`-1)/3)) export GOROOT=
export NVM=$(((`free -g | grep "Mem:" | awk '{print $2}'`-1)/3))
sudo apt-get install -y -q make git curl bison flex bc libssl-dev gcc g++ qemu-system-x86 sudo apt-get install -y -q make git curl bison flex bc libssl-dev gcc g++ qemu-system-x86