mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-14 06:26:30 +00:00
13 lines
481 B
Bash
13 lines
481 B
Bash
#!/bin/bash
|
|
|
|
# Installs golang from the web
|
|
|
|
version="1.17.2"
|
|
if [[ "$UNAME_STR" == "Darwin" ]]; then
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.darwin-amd64.pkg"
|
|
sudo installer -target / -pkg "$TMP_DIR/go${version}.darwin-amd64.pkg"
|
|
elif [[ "$UNAME_STR" == "Linux" ]]; then
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.linux-amd64.tar.gz"
|
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf "$TMP_DIR/go${version}.linux-amd64.tar.gz"
|
|
fi
|