tools/install-go: fix install script

This commit is contained in:
Kyle Isom 2023-04-10 04:55:39 +00:00
parent 7267e2a727
commit 53f337c255
1 changed files with 3 additions and 1 deletions

View File

@ -3,8 +3,8 @@
set -euxo pipefail set -euxo pipefail
INSTALL_DIR="/usr/local/bin" INSTALL_DIR="/usr/local/bin"
GODEB=https://godeb.s3.amazonaws.com/godeb-${ARCH}.tar.gz
GOVERSION=1.20.3 GOVERSION=1.20.3
ARCH=amd64
preflight () { preflight () {
@ -20,11 +20,13 @@ preflight () {
*) *)
echo "[!] $(uname -m) is an unsupported architecture." > /dev/stderr echo "[!] $(uname -m) is an unsupported architecture." > /dev/stderr
echo '[!] supported architectures: amd64, arm64' > /dev/stderr echo '[!] supported architectures: amd64, arm64' > /dev/stderr
exit 1
;; ;;
esac esac
} }
install_godeb () { install_godeb () {
local GODEB=https://godeb.s3.amazonaws.com/godeb-${ARCH}.tar.gz
if [ -x "${INSTALL_DIR}/godeb" ] if [ -x "${INSTALL_DIR}/godeb" ]
then then
return 0 return 0