cwonrails
5/12/2016 - 2:38 PM

go-setup.bash

#!/usr/bin/env bash

mkdir -p $HOME/go/{bin,pkg,src}

brew install go

grep -q "[^0-9a-z-]" <<< $(tail -1 "$HOME/.bashrc") && echo " " >> "$HOME/.bashrc"
echo 'export GOPATH=$HOME/go' | tee -a "$HOME/.bashrc"
echo 'export $GOBIN=$GOPATH/bin' | tee -a "$HOME/.bashrc"