Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
37
scripts/installgo_linux.sh
Normal file
37
scripts/installgo_linux.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
GO_VERSION="1.24.3"
|
||||
GO_ARCH="linux-amd64"
|
||||
# from https://go.dev/dl
|
||||
GO_VERSION_SHA="3333f6ea53afa971e9078895eaa4ac7204a8c6b5c68c10e6bc9a33e8e391bdd8"
|
||||
|
||||
# Download Go and verify Go tarball
|
||||
setup_go () {
|
||||
echo "installing go"
|
||||
curl -L https://go.dev/dl/go${GO_VERSION}.${GO_ARCH}.tar.gz --output go${GO_VERSION}.${GO_ARCH}.tar.gz
|
||||
if ! echo "${GO_VERSION_SHA} go${GO_VERSION}.${GO_ARCH}.tar.gz" | shasum --algorithm 256 --check -; then
|
||||
echo "Checksum failed" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo rm -rfv /usr/local/go
|
||||
sudo tar -C /usr/local -xzf go${GO_VERSION}.${GO_ARCH}.tar.gz
|
||||
}
|
||||
|
||||
if command -v go >/dev/null 2>&1; then
|
||||
echo "Go is already installed"
|
||||
cd
|
||||
v=$(go version | { read -r _ _ v _; echo "${v#go}"; })
|
||||
echo "$v is installed, required version is ${GO_VERSION}"
|
||||
if [ "$v" != ${GO_VERSION} ]; then
|
||||
setup_go
|
||||
fi
|
||||
else
|
||||
setup_go
|
||||
fi
|
||||
|
||||
echo "$PATH"
|
||||
command -v go
|
||||
go version
|
Loading…
Add table
Add a link
Reference in a new issue