You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
251 B
Bash

GO_VERSION="$1"
TMP_DIR="tmp_go"
mkdir -p ${TMP_DIR}
wget --output-document=/dev/stdout https://go.dev/dl/$GO_VERSION.linux-amd64.tar.gz | \
sudo tar --directory ${TMP_DIR} -xzf /dev/stdin
sudo rm -rf /usr/local/go
sudo mv ${TMP_DIR}/go /usr/local