1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-08 06:48:28 +00:00
freebsd-ports/www/mozilla/files/mozilla.sh
Joe Marcus Clarke 5aebc19df3 * Update to 1.4.1
* Add new CLI options to mozilla startup script [1]
* Make XMLTerm optional [2]
* Don't accidentally include mozilla in the plist twice [3]

PR:		55412 [1]
		55330 [2]
		56210 [3]
Submitted by:	bland [1] [2]
2003-10-11 20:30:54 +00:00

34 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 "$@"