2013-08-08 03:23:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-11-13 01:59:41 +00:00
|
|
|
# Installs golang from the web
|
2013-08-08 03:23:13 +00:00
|
|
|
|
2021-07-26 01:43:12 +00:00
|
|
|
version="1.16.6"
|
2013-08-08 03:23:13 +00:00
|
|
|
if [[ "$UNAME_STR" == "Darwin" ]]; then
|
2019-11-13 01:59:41 +00:00
|
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.darwin-amd64-osx10.8.pkg"
|
|
|
|
installer -pkg "$TMP_DIR/go${version}.darwin-amd64-osx10.8.pkg"
|
2013-08-08 03:23:13 +00:00
|
|
|
elif [[ "$UNAME_STR" == "Linux" ]]; then
|
2019-11-13 01:59:41 +00:00
|
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.linux-amd64.tar.gz"
|
2021-07-26 01:43:12 +00:00
|
|
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf "$TMP_DIR/go${version}.linux-amd64.tar.gz"
|
2013-08-08 03:23:13 +00:00
|
|
|
fi
|