Skip to content

Commit

Permalink
[scripts/misc.bash]Remove hard-coded arch in golang download, and use…
Browse files Browse the repository at this point in the history
… build platform arch instead.
  • Loading branch information
samveen authored and tombh committed Jan 30, 2023
1 parent b389228 commit 1591cf8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/misc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,12 @@ function install_golang() {
local version && version=$(parse_golang_version_from_go_mod "$path")
[ "$GOPATH" = "" ] && _panic "GOPATH not set"
[ "$GOROOT" = "" ] && _panic "GOROOT not set"
GOARCH=$(uname -m)
[[ $GOARCH == aarch64 ]] && GOARCH=arm64
echo "Installing Golang v$version... to $GOROOT"
curl -L \
-o go.tar.gz \
https://dl.google.com/go/go"$version".linux-amd64.tar.gz
https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
mkdir -p "$GOPATH"/bin
mkdir -p "$GOROOT"
tar -C "$GOROOT/.." -xzf go.tar.gz
Expand Down

0 comments on commit 1591cf8

Please sign in to comment.