aboutsummaryrefslogtreecommitdiffstats
path: root/www/seamonkey/files/mozilla.sh
blob: bbc7d2568bc6f6be06058f28ca25cbb1db520f52 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/sh

MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%"
MOZILLA_EXEC="mozilla"
LOCATION='new-tab'

cd $MOZILLA_DIR                                     || exit 1

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

# no existing process
exec ./$MOZILLA_EXEC "$@"