mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-12-27 02:27:38 +00:00
14 lines
498 B
Bash
14 lines
498 B
Bash
#!/bin/bash
|
|
|
|
# Installs golang from the web
|
|
|
|
version="1.17.4"
|
|
ARCH=$(uname -m)
|
|
if [[ "$UNAME_STR" == "Darwin" ]]; then
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.darwin-$ARCH.pkg"
|
|
sudo installer -target / -pkg "$TMP_DIR/go${version}.darwin-$ARCH.pkg"
|
|
elif [[ "$UNAME_STR" == "Linux" ]]; then
|
|
wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.linux-$ARCH.tar.gz"
|
|
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf "$TMP_DIR/go${version}.linux-$ARCH.tar.gz"
|
|
fi
|