From a9c7f9f51e5ae991f96c5140fa915273f9ed36d6 Mon Sep 17 00:00:00 2001 From: marcus Date: Wed, 27 Nov 2002 22:48:54 +0000 Subject: Fix the startup script so that it can accept option arguments. This fixes a problem with starting Mozilla from the KDE dock if another instance of Mozilla is already running. Tested by: Vivek Khera Approved by: portmgr (kris) --- www/mozilla/Makefile | 2 +- www/mozilla/files/mozilla.sh | 19 ++++++++++++------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'www/mozilla') diff --git a/www/mozilla/Makefile b/www/mozilla/Makefile index 6709dbfb12d1..408ceded0a2f 100644 --- a/www/mozilla/Makefile +++ b/www/mozilla/Makefile @@ -7,7 +7,7 @@ PORTNAME= mozilla PORTVERSION= 1.1 -PORTREVISION= 2 +PORTREVISION= 3 PORTEPOCH= 2 CATEGORIES= www MASTER_SITES= ${MASTER_SITE_MOZILLA} \ diff --git a/www/mozilla/files/mozilla.sh b/www/mozilla/files/mozilla.sh index cc1eff88a0b1..898fccbc6128 100644 --- a/www/mozilla/files/mozilla.sh +++ b/www/mozilla/files/mozilla.sh @@ -6,13 +6,18 @@ 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 - +case $1 in + -mail) + REMOTE_COMMAND="xfeDoCommand (openInbox)" + ;; + -*) + exec ./$MOZILLA_EXEC "$@" + ;; + *) + REMOTE_COMMAND="openURL($@, $LOCATION)" + ;; +esac + # process found ./$MOZILLA_EXEC -remote "ping()" && ./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 -- cgit