]> git.pld-linux.org Git - packages/mozilla-firefox-bin.git/blobdiff - mozilla-firefox-bin.sh
up to 80.0
[packages/mozilla-firefox-bin.git] / mozilla-firefox-bin.sh
index 9e5d321f4c53199ad0068fd95a84c29881cf26eb..b5ed2b973691097896cb4746564937fb1bd2d545 100644 (file)
@@ -3,6 +3,8 @@
 
 LIBDIR="@LIBDIR@/mozilla-firefox-bin"
 
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR
+
 MOZILLA_FIVE_HOME=$LIBDIR
 
 MOZARGS=
@@ -35,7 +37,7 @@ fi
 # compreg.dat and/or chrome.rdf will screw things up if it's from an
 # older version.  http://bugs.gentoo.org/show_bug.cgi?id=63999
 for f in ~/{.,.mozilla/}firefox/*/{compreg.dat,chrome.rdf,XUL.mfasl}; do
-       if [[ -f ${f} && ${f} -ot /usr/bin/mozilla-firefox ]]; then
+       if [[ -f ${f} && ${f} -ot /usr/bin/mozilla-firefox-bin ]]; then
                echo "Removing ${f} leftover from older firefox"
                rm -f "${f}"
        fi
@@ -47,35 +49,14 @@ else
        FIREFOX="$LIBDIR/firefox"
 fi
 
-if [ "$1" == "-remote" ]; then
-       exec $FIREFOX "$@"
+if [ -f "`pwd`/$1" ]; then
+       URL="file://`pwd`/$1"
 else
-       PING=`$FIREFOX -remote 'ping()' 2>&1 >/dev/null`
-       if [ -n "$PING" ]; then
-               if [ -f "`pwd`/$1" ]; then
-                       exec $FIREFOX "file://`pwd`/$1"
-               else
-                       exec $FIREFOX "$@"
-               fi
-       else
-               if [ -z "$1" ]; then
-                       exec $FIREFOX -remote 'xfeDoCommand(openBrowser)'
-               elif [ "$1" == "-mail" ]; then
-                       exec $FIREFOX -remote 'xfeDoCommand(openInbox)'
-               elif [ "$1" == "-compose" ]; then
-                       exec $FIREFOX -remote 'xfeDoCommand(composeMessage)'
-               else
-                       if [ -f "`pwd`/$1" ]; then
-                               URL="file://`pwd`/$1"
-                       else
-                               URL="$1"
-                       fi
-                       grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep false > /dev/null
-                       if [ $? -ne 0 ]; then
-                               exec $FIREFOX -new-tab "$URL"
-                       else
-                               exec $FIREFOX -new-window "$URL"
-                       fi
-               fi
-       fi
+       URL="$1"
+fi
+grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep false > /dev/null
+if [ $? -ne 0 ]; then
+       exec $FIREFOX -new-tab "$URL"
+else
+       exec $FIREFOX -new-window "$URL"
 fi
This page took 0.026095 seconds and 4 git commands to generate.