|
|
@ -1,5 +1,14 @@
|
|
|
|
#!/bin/bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GO_AMD64=https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
|
|
|
|
|
|
|
|
GO_X86=https://storage.googleapis.com/golang/go1.5.1.linux-386.tar.gz
|
|
|
|
|
|
|
|
ARCH=$(uname -m)
|
|
|
|
|
|
|
|
GO_CUR=${GO_AMD64}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ "$ARCH" == "i686" || "$ARCH" == "i386" ]; then
|
|
|
|
|
|
|
|
GO_CUR=${GO_X86}
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
function git_not_installed {
|
|
|
|
function git_not_installed {
|
|
|
|
git --version 2>&1 >/dev/null
|
|
|
|
git --version 2>&1 >/dev/null
|
|
|
|
GIT_IS_AVAILABLE=$?
|
|
|
|
GIT_IS_AVAILABLE=$?
|
|
|
@ -12,7 +21,7 @@ fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$GOPATH" ]; then
|
|
|
|
if [ -z "$GOPATH" ]; then
|
|
|
|
curl -o go_latest.tar.gz https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz
|
|
|
|
curl -o go_latest.tar.gz ${GO_CUR}
|
|
|
|
tar -C /usr/local -xzf go_latest.tar.gz
|
|
|
|
tar -C /usr/local -xzf go_latest.tar.gz
|
|
|
|
rm go_latest.tar.gz
|
|
|
|
rm go_latest.tar.gz
|
|
|
|
export PATH=$PATH:/usr/local/go/bin
|
|
|
|
export PATH=$PATH:/usr/local/go/bin
|
|
|
|