]> git.pld-linux.org Git - packages/firefox.git/blame - mozilla-firefox.sh
- added fixes suggested by Kacper Kornet, build and works for me, release 1.1
[packages/firefox.git] / mozilla-firefox.sh
CommitLineData
763f73fd 1#!/bin/sh
2# based on script by (c) vip at linux.pl, wolf at pld-linux.org
3
f594d491
MK
4if [ `arch` == "x86_64" ]; then
5 LIBDIR="/usr/lib64/mozilla-firefox"
6else
7 LIBDIR="/usr/lib/mozilla-firefox"
8fi
9
10MOZILLA_FIVE_HOME=$LIBDIR
763f73fd 11if [ "$1" == "-remote" ]; then
f594d491 12 $LIBDIR/firefox "$@"
763f73fd 13else
f594d491 14 PING=`$LIBDIR/firefox -remote 'ping()' 2>&1 >/dev/null`
763f73fd 15 if [ -n "$PING" ]; then
16 if [ -f "`pwd`/$1" ]; then
f594d491 17 $LIBDIR/firefox "file://`pwd`/$1"
763f73fd 18 else
f594d491 19 $LIBDIR/firefox "$@"
763f73fd 20 fi
21 else
22 if [ -z "$1" ]; then
f594d491 23 $LIBDIR/firefox -remote 'xfeDoCommand (openBrowser)'
763f73fd 24 elif [ "$1" == "-mail" ]; then
f594d491 25 $LIBDIR/firefox -remote 'xfeDoCommand (openInbox)'
763f73fd 26 elif [ "$1" == "-compose" ]; then
f594d491 27 $LIBDIR/firefox -remote 'xfeDoCommand (composeMessage)'
763f73fd 28 else
29 if [ -f "`pwd`/$1" ]; then
30 URL="file://`pwd`/$1"
31 else
32 URL="$1"
33 fi
34 grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep true > /dev/null
35 if [ 0 -eq 0 ]; then
f594d491 36 $LIBDIR/firefox -remote "OpenUrl($URL,new-tab)"
763f73fd 37 else
f594d491 38 $LIBDIR/firefox -remote "OpenUrl($URL,new-window)"
763f73fd 39 fi
40 fi
41 fi
42fi
This page took 0.038282 seconds and 4 git commands to generate.