Skip to content

Instantly share code, notes, and snippets.

@Natata
Last active May 19, 2018 08:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Natata/41584454a978a9b91f04af5e4bf77fad to your computer and use it in GitHub Desktop.
#!/bin/sh
# usage:
# ./go_installer_mac.sh [go version]
#
# example install go 1.10.2:
# ./go_installer_mac.sh 1.10.2
set -uex
go_version=$1
wget https://dl.google.com/go/go${go_version}.darwin-amd64.tar.gz
tar -C /usr/local -xzf go${go_version}.darwin-amd64.tar.gz
rm go${go_version}.darwin-amd64.tar.gz
echo "install completed"
echo "export /usr/local/go/bin to your path"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment