1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
metamask-extension/.circleci/scripts/firefox-install.sh
Mark Stacey 73e0fdddd0
Use .sh file extension for all Bash scripts (#10499)
The `.sh` file extension is now used for all Bash scripts. This ensures
the files are recognized as Bash scripts by the ShellCheck CI job, and
by editors/IDEs for improved syntax highlighting.
2021-02-23 12:56:41 -03:30

30 lines
860 B
Bash
Executable File

#!/usr/bin/env bash
set -e
set -u
set -o pipefail
FIREFOX_VERSION='83.0'
FIREFOX_BINARY="firefox-${FIREFOX_VERSION}.tar.bz2"
FIREFOX_BINARY_URL="https://ftp.mozilla.org/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/${FIREFOX_BINARY}"
FIREFOX_PATH='/opt/firefox'
printf '%s\n' "Removing old Firefox installation"
sudo rm -r "${FIREFOX_PATH}"
printf '%s\n' "Downloading & installing Firefox ${FIREFOX_VERSION}"
wget --quiet --show-progress -O- "${FIREFOX_BINARY_URL}" | sudo tar xj -C /opt
printf '%s\n' "Firefox ${FIREFOX_VERSION} installed"
{
printf '%s\n' 'pref("general.config.filename", "firefox.cfg");'
printf '%s\n' 'pref("general.config.obscure_value", 0);'
} | sudo tee "${FIREFOX_PATH}/defaults/pref/autoconfig.js"
sudo cp .circleci/scripts/firefox.cfg "${FIREFOX_PATH}"
printf '%s\n' "Firefox ${FIREFOX_VERSION} configured"