kopia lustrzana https://github.com/browsh-org/browsh
[scripts/misc.bash]Remove hard-coded arch in golang download, and use build platform arch instead.
rodzic
b389228682
commit
1591cf8e6a
|
@ -51,10 +51,12 @@ function install_golang() {
|
||||||
local version && version=$(parse_golang_version_from_go_mod "$path")
|
local version && version=$(parse_golang_version_from_go_mod "$path")
|
||||||
[ "$GOPATH" = "" ] && _panic "GOPATH not set"
|
[ "$GOPATH" = "" ] && _panic "GOPATH not set"
|
||||||
[ "$GOROOT" = "" ] && _panic "GOROOT not set"
|
[ "$GOROOT" = "" ] && _panic "GOROOT not set"
|
||||||
|
GOARCH=$(uname -m)
|
||||||
|
[[ $GOARCH == aarch64 ]] && GOARCH=arm64
|
||||||
echo "Installing Golang v$version... to $GOROOT"
|
echo "Installing Golang v$version... to $GOROOT"
|
||||||
curl -L \
|
curl -L \
|
||||||
-o go.tar.gz \
|
-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 "$GOPATH"/bin
|
||||||
mkdir -p "$GOROOT"
|
mkdir -p "$GOROOT"
|
||||||
tar -C "$GOROOT/.." -xzf go.tar.gz
|
tar -C "$GOROOT/.." -xzf go.tar.gz
|
||||||
|
|
Ładowanie…
Reference in New Issue