The purpose of this script is to help make upgrading the Slackware Firefox package even more convenient. To do this the script:
Copies any plugins under your old Firefox plugins directory to the new plugins directory
allows you to back up and restore /usr/bin/firefox in case you use a custom script there
patches Firefox's FeedConverter.js for you so that you can add RSS feeds to your external feed reader (eg. Akregator) from within Firefox.
You can download the script here
By default, if no args are given the script will look for the new Firefox package and the FirefoxFeed.patch file in the current directory. To specify where to find the package simply enter it as an argument (eg.
You can also specify where the patch file is (using FEEDPATCH) and if /usr/bin/firefox should be backed up and restored (using BACKUPBIN which defaults to 0, or false).
FEEDPATCH=/path/to/FirefoxFeed.patch BACKUPBIN=1 upgradeFirefoxPackage /path/to/mozilla-firefox-22.214.171.124.tgz
Since BACKUPBIN is 1 /usr/bin/firefox would be backed up and restored. Please note that if you do this unnecessarily you will most likely end up with /usr/bin/firefox pointing to your old location, so only use this if you have a special symlink or script there.
An example of such a script would be one that allows you to automatically choose the correct profile if switching between Firefox 1.5, 2.0, Swiftfox, etc.
About the Plugins:
One of the reasons users put their plugins under /usr/lib/firefox/plugins instead of /usr/lib/mozilla/plugins is because they do not have the seamonkey package installed. If you are one of those users that has plugins under /usr/lib/firefox/plugins then the regular upgradepkg will not do everything you need. Your plugins won't be copied over to the new location and your old Firefox program directory will still be there. This script fixes that by making sure they are copied over and the old Firefox directory is completely deleted.
The RSS Feed patch:
If no readable patch file is found then FeedConverter.js will not be patched. I will repeat that. If you do not want to use the patch then simply do not put the patch file in the working directory and do not specify where to find it.
Otherwise, your FeedConverter.js file will be patched and a backup will be created called FeedConverter.js.orig. The patch can be found under my patches directory
. You will need to modify some Firefox preferences to make use of the patch. For more information on that please see this thread about Subscribing to RSS Feeds in Firefox 2.0
. At a minimum you will have to at least modify browser.feeds.handlers.application
in your about:config
This script does include error checking to make sure you don't try to run it as a non-root user, upgrade with an older version, upgrade with a regular tar.gz file, etc. The script will confirm before any upgrade is done as well, so it is unlikely you could do anything stupid or dangerous with this script unless you set out to do so. Even so, I encourage you to read the script prior to using it, and you use it at your own risk.
This script will not perform an upgrade if you have installed more than one version of firefox through your package manager (namely more than one is listed under /var/logs/packages/mozilla-firefox*).
One thing this script currently does not check for is if you have other modified files under your old Firefox program directory. This should not be a problem unless you installed global addons or created a global default profile.
Please leave a post if this was helpful to you or if you have any questions, concerns, or comments.