3 # This script is used to add and remove our extension from the Firefox
4 # directory, and is run from 'triggers' when Firefox is installed or
5 # upgraded, as well as when our package is installed.
8 firedir=/usr/GET_LIBDIR/mozilla-firefox
11 if [ "$1" = "install" ] ; then
12 for d in ${firedirs} ; do
13 # Add symlink to the firefox directory that looks like it is part of a
14 # currently installed package
15 if [ -e "$d/firefox-bin" -a -d "$d/extensions" -a ! -L "$d/extensions/firefox@mugshot.org" ] ; then
16 ln -s /usr/GET_LIBDIR/mugshot/firefox "$d/extensions/firefox@mugshot.org"
19 elif [ "$1" = "remove" ] ; then
20 for d in ${firedirs} ; do
21 # Remove the symlink we've created
22 if [ -L "$d/extensions/firefox@mugshot.org" ] ; then
23 rm "$d/extensions/firefox@mugshot.org"
27 echo "Usage firefox-update.sh [install/remove]"