2 # based on script by (c) vip at linux.pl, wolf at pld-linux.org
4 LIBDIR="@LIBDIR@/firefox"
6 # copy profile from Iceweasel if its available and if no Firefox
8 if [ ! -d $HOME/.mozilla/firefox ]; then
9 if [ -d $HOME/.iceweasel ]; then
10 echo "Copying profile from Iceweasel"
11 cp -rf $HOME/.iceweasel $HOME/.mozilla/firefox
15 # compreg.dat and/or chrome.rdf will screw things up if it's from an
16 # older version. http://bugs.gentoo.org/show_bug.cgi?id=63999
17 for f in ~/.mozilla/firefox/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
18 if [[ -f ${f} && ${f} -ot /usr/bin/firefox ]]; then
19 echo "Removing ${f} leftover from older firefox"
24 FIREFOX="$LIBDIR/firefox"
29 elif [ $# -eq 1 -a "$1" = "${1#-}" ]; then
30 if [ -f "$PWD/$1" ]; then
35 if ! grep -q browser.tabs.opentabfor.middleclick.*false ~/.mozilla/firefox/*/prefs.js; then
36 exec $FIREFOX -new-tab "$URL"
38 exec $FIREFOX -new-window "$URL"