]> git.pld-linux.org Git - packages/seamonkey.git/blob - seamonkey.sh
- dot-dir is .mozilla/seamonkey
[packages/seamonkey.git] / seamonkey.sh
1 #!/bin/sh
2 # based on script by (c) vip at linux.pl, wolf at pld-linux.org
3
4 LIBDIR="@LIBDIR@/seamonkey"
5
6 SEAMONKEY="$LIBDIR/seamonkey"
7 PWD=${PWD:-$(pwd)}
8
9 if [ "$1" = "-remote" ]; then
10         exec $SEAMONKEY "$@"
11 else
12         if ! $SEAMONKEY -remote 'ping()' 2>/dev/null; then
13                 if [ -f "$PWD/$1" ]; then
14                         exec $SEAMONKEY "file://$PWD/$1"
15                 else
16                         exec $SEAMONKEY "$@"
17                 fi
18         else
19                 if [ -z "$1" ]; then
20                         exec $SEAMONKEY -remote 'xfeDoCommand(openBrowser)'
21                 elif [ "$1" = "-mail" ]; then
22                         exec $SEAMONKEY -remote 'xfeDoCommand(openInbox)'
23                 elif [ "$1" = "-compose" -o "$1" = "-editor" ]; then
24                         exec $SEAMONKEY -remote 'xfeDoCommand(composeMessage)'
25                 else
26                         if [ -f "$PWD/$1" ]; then
27                                 URL="file://$PWD/$1"
28                         else
29                                 URL="$1"
30                         fi
31                         if ! grep -q browser.tabs.opentabfor.middleclick.*false ~/.mozilla/seamonkey/*/prefs.js; then
32                                 exec $SEAMONKEY -new-tab "$URL"
33                         else
34                                 exec $SEAMONKEY -new-window "$URL"
35                         fi
36                 fi
37         fi
38 fi
This page took 0.024943 seconds and 3 git commands to generate.