blob: 0e34950cd32ce7ea2d2d3d7166193dfcd95be583 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
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 "$@"
|