Skip to content

Commit

Permalink
only install golang from src on linux
Browse files Browse the repository at this point in the history
  • Loading branch information
vastbinderj committed Jul 15, 2015
1 parent 8af22b5 commit d3da164
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions dotfiles/setup-a-new-machine.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GOSYSTEMVERSION=`go version`
if [ ! -d "$HOME/code" ]; then
mkdir -p $HOME/code
fi
$CODEDIR="$HOME/code"
CODEDIR="$HOME/code"

# create GOPATH dirs
if [ ! -d "$HOME/go" ]; then
Expand Down Expand Up @@ -109,28 +109,30 @@ elif [[ "$OSTYPE" == "linux-gnu" ]]; then
silversearcher-ag \
-y --reinstall
fi
fi

# go.googlesource.com/go
# install golang from the source repository
if [[ "$GOSYSTEMVERSION" == *"go1.4.2"* ]]; then
# clean up soure dir if exists already
if [ -d $HOME/go ]; then
rm -f $HOME/go

# go.googlesource.com/go
# install golang from the source repository
if [[ "$GOSYSTEMVERSION" == *"go1.4.2"* ]]; then
# clean up soure dir if exists already
if [ -d $HOME/go ]; then
rm -f $HOME/go
fi
git clone https://go.googlesource.com/go $HOME/code/go
cd $HOME/go
# checkout go 1.4.2
git checkout go1.4.2
cd $HOME/go/src
# build from source
CMD="sudo ./all.bash"
eval $CMD
# back to working dir
cd $WORKDIR
unset CMD
fi
git clone https://go.googlesource.com/go $HOME/code/go
cd $HOME/go
# checkout go 1.4.2
git checkout go1.4.2
cd $HOME/go/src
# build from source
CMD="sudo ./all.bash"
eval $CMD
# back to working dir
cd $WORKDIR
unset CMD
fi


# github.com/jamiew/git-friendly
# the `push` command which copies the github compare URL to my clipboard is heaven
bash < <( curl https://raw.github.com/jamiew/git-friendly/master/install.sh)
Expand Down

0 comments on commit d3da164

Please sign in to comment.