Last active
December 19, 2018 13:22
-
-
Save figassis/871ad624785391b8b6fd65765ee6ed44 to your computer and use it in GitHub Desktop.
Installer Script for Go (Linux and OSX)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Chekc if running on OSX or Linux | |
case "$OSTYPE" in | |
darwin*) VERSION=go1.9.2.darwin-amd64.tar.gz ;; | |
*) VERSION=go1.9.2.linux-amd64.tar.gz ;; | |
esac | |
wget https://redirector.gvt1.com/edgedl/go/$VERSION | |
tar -C /usr/local -xzf $VERSION | |
rm $VERSION | |
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.profile | |
echo "export GOPATH=$HOME/go" >> $HOME/.profile | |
source $HOME/.profile | |
mkdir -p $HOME/go/src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Chekc if running on OSX or Linux | |
case "$OSTYPE" in | |
darwin*) VERSION=go1.9.2.darwin-amd64.tar.gz ;; | |
*) VERSION=go1.9.2.linux-amd64.tar.gz ;; | |
esac | |
wget https://redirector.gvt1.com/edgedl/go/$VERSION | |
sudo tar -C /usr/local -xzf $VERSION | |
rm $VERSION | |
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.profile | |
echo "export GOPATH=$HOME/go" >> $HOME/.profile | |
source $HOME/.profile | |
mkdir -p $HOME/go/src |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment