diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-11-24 00:24:04 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2002-11-24 00:24:04 +0000 |
commit | 4fb17247943ea449a89a8f94fd535678f7872fb7 (patch) | |
tree | 0e44f3412e09a919724764d42c9714137e594f7d /www/mozilla | |
parent | Update to 2.0.3. (diff) |
Make the Mozilla startup scripts a little smarter. Instead of launching a
new Mozilla instance each time, check to see if one already exists, and if
so, spawn a new browser tab in the current window.
PR: 45610
Submitted by: Nick Jennings
Notes
Notes:
svn path=/head/; revision=70922
Diffstat (limited to 'www/mozilla')
-rw-r--r-- | www/mozilla/Makefile | 4 | ||||
-rw-r--r-- | www/mozilla/files/mozilla.sh | 24 |
2 files changed, 22 insertions, 6 deletions
diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile index 43e319e1d2d8..6709dbfb12d1 100644 --- a/www/mozilla/Makefile +++ b/www/mozilla/Makefile @@ -7,7 +7,7 @@ PORTNAME= mozilla PORTVERSION= 1.1 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ @@ -113,7 +113,7 @@ post-patch: ${WRKSRC}/build/unix/run-mozilla.sh post-build: - ${SED} -e "s;@PREFIX@;${PREFIX};g" \ + ${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \ ${FILESDIR}/mozilla.sh >${WRKSRC}/mozilla (cd ${WRKSRC}/dist/bin; \ ${SETENV} LD_LIBRARY_PATH=. MOZILLA_FIVE_HOME=. ./regxpcom; \ diff --git a/www/mozilla/files/mozilla.sh b/www/mozilla/files/mozilla.sh index 699f5d9d52f1..cc1eff88a0b1 100644 --- a/www/mozilla/files/mozilla.sh +++ b/www/mozilla/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 "$@" + |