4 ms·
Firefox udpate script based around: /usr/bin/wget -nc --trust-server-names \ 'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=
by ttctciyf 5y ago
Firefox udpate script based around:
/usr/bin/wget -nc --trust-server-names \
'https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64&lang=en-US'
which retrieves the latest release. After downloading, it's unpacked to a new directory named after the firefox version, under opt:
FFFILE=`ls -tr ./firefox-*bz2 | tail -n 1`
NEWFFDIR="/opt/"`echo $FFFILE | perl -pe 's/.*firefox-([0-9\.]+[0-9]).*/ff-$1/'`
and then linked to a standard place (/opt/firefox)
/usr/bin/sudo /bin/ln -s $NEWFFDIR/firefox /opt/firefox-new
/usr/bin/sudo /bin/mv -T /opt/firefox-new /opt/firefox
/usr/bin/firefox is already a link to /opt/firefox/firefox.
Old /opt/ff-XYZ dirs are culled manually.
This is easier for me than manual update from the browser, or relying on the distro's firefox updates. It also allows me a backout option while I acclimatise to new Firefox "features."
It took me about 30-40 manual updates before I got around to writing the script :)