sing-box/release/local/install_go.sh

10 lines
401 B
Bash
Raw Normal View History

2022-08-27 14:27:58 +00:00
#!/usr/bin/env bash
set -e -o pipefail
2023-03-29 05:23:18 +00:00
go_version=$(curl -s https://raw.githubusercontent.com/actions/go-versions/main/versions-manifest.json | grep -oE '"version": "[0-9]{1}.[0-9]{1,}(.[0-9]{1,})?"' | head -1 | cut -d':' -f2 | sed 's/ //g; s/"//g')
curl -Lo go.tar.gz "https://go.dev/dl/go$go_version.linux-amd64.tar.gz"
2022-08-27 14:27:58 +00:00
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go.tar.gz
2023-02-18 13:14:17 +00:00
rm go.tar.gz