Skip to content

Instantly share code, notes, and snippets.

@dece
Last active June 12, 2018 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dece/69853daa6d577a7fa4718f7f8955d44e to your computer and use it in GitHub Desktop.
Save dece/69853daa6d577a7fa4718f7f8955d44e to your computer and use it in GitHub Desktop.
FirefoxUpdate - Update a Firefox version from shell, e.g. newest Firefox stable on Debian stable (which is otherwise stuck with ESR).
#!/bin/bash
# Update a Firefox version from shell.
# Useful for Debian stable and its ESR shenanigans.
# Can break due to a lot of things but w/e get off my lawn.
FFX_DIR="/opt/firefox"
INSTALL_DIR="$(dirname $FFX_DIR)"
# You can add a 'lang' query param to URL if you want (e.g. 'fr', 'it', ...)
BASE_URL="https://download.mozilla.org/"
FFX_PRODUCT="firefox-latest-ssl"
FFX_OS="linux64"
URL="${BASE_URL}?product=${FFX_PRODUCT}&os=${FFX_OS}"
ARCHIVE_NAME="$(tempfile)"
cd $INSTALL_DIR
curl -Lv $URL -o $ARCHIVE_NAME
sudo tar xf $ARCHIVE_NAME
rm $ARCHIVE_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment