aboutsummaryrefslogtreecommitdiff
path: root/www/mozilla-devel/files
diff options
context:
space:
mode:
authorJoe Marcus Clarke <marcus@FreeBSD.org>2002-11-24 00:24:04 +0000
committerJoe Marcus Clarke <marcus@FreeBSD.org>2002-11-24 00:24:04 +0000
commit4fb17247943ea449a89a8f94fd535678f7872fb7 (patch)
tree0e44f3412e09a919724764d42c9714137e594f7d /www/mozilla-devel/files
parentbb05f6c924a31b8c91d3edbad4cc5efbfc707e52 (diff)
Notes
Diffstat (limited to 'www/mozilla-devel/files')
-rw-r--r--www/mozilla-devel/files/mozilla.sh24
1 files changed, 20 insertions, 4 deletions
diff --git a/www/mozilla-devel/files/mozilla.sh b/www/mozilla-devel/files/mozilla.sh
index efea04a63e16..0e34950cd32c 100644
--- a/www/mozilla-devel/files/mozilla.sh
+++ b/www/mozilla-devel/files/mozilla.sh
@@ -1,6 +1,22 @@
#!/bin/sh
-#
-# $FreeBSD$
-cd @PREFIX@/lib/%%MOZILLA%%
-exec ./mozilla "$@"
+MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
+MOZILLA_EXEC="mozilla"
+LOCATION='new-tab'
+
+cd $MOZILLA_DIR || exit 1
+
+# catch calls for mozilla mail
+if [ "$1" = "-mail" ]; then
+ REMOTE_COMMAND="xfeDoCommand (openInbox)"
+else
+ REMOTE_COMMAND="openURL($@, $LOCATION)"
+fi
+
+# process found
+./$MOZILLA_EXEC -remote "ping()" &&
+./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0
+
+# no existing process
+exec ./$MOZILLA_EXEC "$@"
+