freebsd-ports/www/seamonkey/files/mozilla.sh
Joe Marcus Clarke 2213e9a1d9 * Add a knob to optionally build XMLTerm [1]
* Add some extra CLI options to the mozilla.sh script [2]
* Add a patch to prevent crashes when visiting certain Russian sites [3]
* Add a dependency on devel/nspr to avoid problems with Galeon and Epiphany
  in certain setups [4]

PR:		55330 [1]
		55412 [2]
Submitted by:	Alexander Nedotsukov <bland@mail.ru> [1] [2]
		Sergey Akifyev <asa@gascom.ru> [4]
Obtained from:	www/mozilla-firebird [3]
2003-08-12 16:48:56 +00:00

33 lines
660 B
Bash

#!/bin/sh
MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
LOCATION='new-tab'
cd $MOZILLA_DIR || exit 1
case $1 in
-browser)
REMOTE_COMMAND="xfeDoCommand (openBrowser)"
;;
-mail)
REMOTE_COMMAND="xfeDoCommand (openInbox)"
;;
-compose)
REMOTE_COMMAND="xfeDoCommand (composeMessage)"
;;
-*)
exec ./$MOZILLA_EXEC "$@"
;;
*)
REMOTE_COMMAND="openURL($@, $LOCATION)"
;;
esac
# process found
./$MOZILLA_EXEC -remote "ping()" &&
./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
# no existing process
exec ./$MOZILLA_EXEC "$@"