]> Pileus Git - ~andy/sunrise/blob - net-misc/mugshot/files/mugshot-1.1.26-firefox-update.sh
9e2429012662d63dd1162fa9b92401b255407434
[~andy/sunrise] / net-misc / mugshot / files / mugshot-1.1.26-firefox-update.sh
1 #!/bin/sh
2
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. 
6 #
7
8
9 d=/usr/GET_LIBDIR/mozilla-firefox
10
11 if [ "$1" = "install" ] ; then
12     # Add symlink to the firefox directory that looks like it is part of a
13     # currently installed package
14     if [ -e "$d/firefox-bin" -a -d "$d/extensions" -a ! -L "$d/extensions/firefox@mugshot.org" ] ; then
15         ln -s /usr/GET_LIBDIR/mugshot/firefox "$d/extensions/firefox@mugshot.org"
16     fi
17 elif [ "$1" = "remove" ] ; then
18     # Remove the symlink we've created 
19     if [ -L "$d/extensions/firefox@mugshot.org" ] ; then
20         rm "$d/extensions/firefox@mugshot.org"
21     fi
22 else
23     echo "Usage firefox-update.sh [install/remove]"
24 fi