Last active
June 17, 2019 19:57
-
-
Save Gabelbombe/ad92bc78e24c6696da04fa8380bbcd81 to your computer and use it in GitHub Desktop.
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 characters
#!/usr/bin/env bash -xe | |
release=$(curl --silent https://golang.org/doc/devel/release.html |grep -Eo 'go[0-9]+(\.[0-9]+)+' |sort -V |uniq |tail -1) | |
os=$(uname -s |tr '[:upper:]' '[:lower:]') | |
arch=$(case "$(uname -m)" in i*) echo '386' ;; x*) echo 'amd64' ;; *) echo 'armv61'; esac) | |
curl --silent https://storage.googleapis.com/golang/$release.$os-$arch.tar.gz \ | |
| sudo tar -vxz --strip-components 1 -C $(dirname $(dirname $(which go))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment