mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2024-11-13 02:06:31 +00:00
18 lines
541 B
Bash
Executable File
18 lines
541 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Installs golang from the web
|
|
|
|
version="1.19"
|
|
ARCH=$(uname -m)
|
|
if [ "$ARCH" = "x86_64" ]; then
|
|
ARCH=amd64
|
|
fi
|
|
|
|
if [[ "$UNAME_STR" == "Darwin" ]]; then
|
|
wget -P "$TMP_DIR/" "https://go.dev/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/" "https://go.dev/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
|