Added install scripts

This commit is contained in:
Jae Kwon
2015-05-12 11:00:22 -07:00
parent c0d67112c3
commit 47f1a91379
5 changed files with 120 additions and 16 deletions

22
INSTALL/install_golang.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Run this as tmuser user
# This part is for installing go
if [ `whoami` != "root" ];
then
cd /home/tmuser
mkdir gocode
wget https://storage.googleapis.com/golang/go1.4.2.src.tar.gz
tar -xzvf go*.tar.gz
cd go/src
./make.bash
cd /home/tmuser
cp /etc/skel/.bashrc .
mkdir -p /home/tmuser/go/src
echo 'export GOROOT=/home/tmuser/go' >> /home/tmuser/.bashrc
echo 'export GOPATH=/home/tmuser/gocode' >> /home/tmuser/.bashrc
echo 'export PATH=$PATH:$GOROOT/bin' >> /home/tmuser/.bashrc
source /home/tmuser/.bashrc
else
echo "should not be root to run install_golang.sh"
fi