Skip to content

Commit

Permalink
fix: Golang install: use "amd64" for "x86_64"
Browse files Browse the repository at this point in the history
  • Loading branch information
tombh committed Feb 2, 2023
1 parent 1d4211c commit d32ae0b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions scripts/bundling.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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)"
}
6 changes: 4 additions & 2 deletions scripts/misc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d32ae0b

Please sign in to comment.