mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-11-09 18:43:14 +00:00
10 lines
401 B
Bash
Executable file
10 lines
401 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e -o pipefail
|
|
|
|
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"
|
|
sudo rm -rf /usr/local/go
|
|
sudo tar -C /usr/local -xzf go.tar.gz
|
|
rm go.tar.gz
|