summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Buckley-Houston <tom@tombh.co.uk>2023-01-30 22:04:52 -0500
committerThomas Buckley-Houston <tom@tombh.co.uk>2023-02-02 18:38:32 -0500
commitd32ae0ba5a1df266b96772fcd0b62ab8a76429ac (patch)
tree8d8878f019f5a889aceea81f4bc0f2d5b6193305
parent1d4211ceb045fc40bf0c6f312d9b0a4c06276d74 (diff)
fix: Golang install: use "amd64" for "x86_64"
-rw-r--r--scripts/bundling.bash6
-rw-r--r--scripts/misc.bash6
2 files changed, 8 insertions, 4 deletions
diff --git a/scripts/bundling.bash b/scripts/bundling.bash
index a46bfcf..8821c0f 100644
--- a/scripts/bundling.bash
+++ b/scripts/bundling.bash
@@ -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)"
}
diff --git a/scripts/misc.bash b/scripts/misc.bash
index 2bf0001..7092988 100644
--- a/scripts/misc.bash
+++ b/scripts/misc.bash
@@ -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