Last active
July 28, 2022 06:38
-
-
Save jpillora/dcabf16e99d087eae6e0 to your computer and use it in GitHub Desktop.
Revisions
-
jpillora revised this gist
Oct 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ fi function install { echo "Fetching latest Go version..." typeset VER=`curl -s https://golang.org/dl/ | grep -m 1 -o 'go1\(\.[0-9]\)\+'` if uname -m | grep 64 > /dev/null; then typeset ARCH=amd64 else -
jpillora created this gist
Sep 4, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ #!/bin/bash #force run with bash if [ -z "$BASH_VERSION" ] then exec bash "$0" "$@" return fi #create local scope function install { echo "Fetching latest Go version..." typeset VER=`curl -s http://golang.org/dl/ | grep -m 1 -o 'go1\(\.[0-9]\)\+'` if uname -m | grep 64 > /dev/null; then typeset ARCH=amd64 else typeset ARCH=386 fi typeset FILE=$VER.linux-$ARCH echo "Installing '$FILE'..." curl -# https://storage.googleapis.com/golang/$FILE.tar.gz | tar -C /usr/local -xzf - echo " # Go Paths (Added on: `date -u`) export GOPATH=\$HOME/go export PATH=\$PATH:/usr/local/go/bin:\$GOPATH/bin " >> ~/.bash_profile . ~/.bash_profile echo "Go is installed and your GOPATH is '$HOME/go'" echo "Please reload this shell or enter the command '. ~/.bash_profile'" } install