Last active
June 12, 2018 13:32
-
-
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).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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