X-Git-Url: http://git.pld-linux.org/gitweb.cgi?p=packages%2Fmozilla-firefox-bin.git;a=blobdiff_plain;f=mozilla-firefox-bin.sh;h=b5ed2b973691097896cb4746564937fb1bd2d545;hp=3d6e8e1d0b758643b558013d16dd9c68640e6b79;hb=ddd17e66caa5e65df38dfd28ec369c97126394b3;hpb=ee3fb9b2ce75787cc6fc1e593f3cab098b9ccc38 diff --git a/mozilla-firefox-bin.sh b/mozilla-firefox-bin.sh index 3d6e8e1..b5ed2b9 100644 --- a/mozilla-firefox-bin.sh +++ b/mozilla-firefox-bin.sh @@ -3,6 +3,8 @@ LIBDIR="@LIBDIR@/mozilla-firefox-bin" +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBDIR + MOZILLA_FIVE_HOME=$LIBDIR MOZARGS= @@ -47,36 +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 - pkill -f mozilla-firefox-bin - 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