#!/usr/bin/env bash set -e set -u set -o pipefail FIREFOX_VERSION='61.0.1' 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}" printf '%s\n' "Removing old Firefox installation" sudo rm -r /opt/firefox 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"