fix: Golang install: use "amd64" for "x86_64"

This commit is contained in:
Thomas Buckley-Houston 2023-01-30 22:04:52 -05:00
parent 1d4211ceb0
commit d32ae0ba5a
2 changed files with 8 additions and 4 deletions

View File

@ -81,11 +81,13 @@ function _rename_built_xpi() {
function bundle_production_webextension() {
local version && version=$(browsh_version)
local base='https://github.com/browsh-org/browsh/releases/download'
local release_url="$base/v$version/browsh-$version-an.fx.xpi"
local release_url="$base/v$version/browsh-$version.xpi"
echo "Downloading webextension from: $release_url"
local size && size=$(wc -c <"$XPI_PATH")
curl -L -o "$XPI_PATH" "$release_url"
local size && size=$(wc -c <"$XPI_PATH")
if [ "$size" -lt 500 ]; then
echo "XPI size seems too small: $size"
_panic "Problem downloading latest webextension XPI"
fi
cp -a "$XPI_PATH" "$(versioned_xpi_file)"
}

View File

@ -53,10 +53,12 @@ function install_golang() {
[ "$GOROOT" = "" ] && _panic "GOROOT not set"
GOARCH=$(uname -m)
[[ $GOARCH == aarch64 ]] && GOARCH=arm64
echo "Installing Golang v$version... to $GOROOT"
[[ $GOARCH == x86_64 ]] && GOARCH=amd64
url=https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
echo "Installing Golang ($url)... to $GOROOT"
curl -L \
-o go.tar.gz \
https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
"$url"
mkdir -p "$GOPATH"/bin
mkdir -p "$GOROOT"
tar -C "$GOROOT/.." -xzf go.tar.gz