From 04014bcf3916f081c0ea549faad75591496674d6 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 5 Apr 2022 16:54:47 -0700 Subject: [PATCH] Fix amd64 arch for golang and update to 1.18 --- recipes/default/golang | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/recipes/default/golang b/recipes/default/golang index 91de310..5f69b60 100644 --- a/recipes/default/golang +++ b/recipes/default/golang @@ -2,12 +2,16 @@ # Installs golang from the web -version="1.17.4" +version="1.18" ARCH=$(uname -m) +if [ "$ARCH" = "x86_64" ]; then + ARCH=amd64 +fi + if [[ "$UNAME_STR" == "Darwin" ]]; then - wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.darwin-$ARCH.pkg" + wget -P "$TMP_DIR/" "https://go.dev/dl/go${version}.darwin-$ARCH.pkg" sudo installer -target / -pkg "$TMP_DIR/go${version}.darwin-$ARCH.pkg" elif [[ "$UNAME_STR" == "Linux" ]]; then - wget -P "$TMP_DIR/" "http://golang.org/dl/go${version}.linux-$ARCH.tar.gz" + wget -P "$TMP_DIR/" "https://go.dev/dl/go${version}.linux-$ARCH.tar.gz" sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf "$TMP_DIR/go${version}.linux-$ARCH.tar.gz" fi