]> git.pld-linux.org Git - packages/seamonkey.git/commitdiff
- based on iceweasel.sh
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 3 Jun 2012 08:43:00 +0000 (08:43 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    seamonkey.sh -> 1.1

seamonkey.sh [new file with mode: 0644]

diff --git a/seamonkey.sh b/seamonkey.sh
new file mode 100644 (file)
index 0000000..3eefbbe
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+# based on script by (c) vip at linux.pl, wolf at pld-linux.org
+
+LIBDIR="@LIBDIR@/seamonkey"
+
+SEAMONKEY="$LIBDIR/seamonkey"
+PWD=${PWD:-$(pwd)}
+
+if [ "$1" = "-remote" ]; then
+       exec $SEAMONKEY "$@"
+else
+       if ! $SEAMONKEY -remote 'ping()' 2>/dev/null; then
+               if [ -f "$PWD/$1" ]; then
+                       exec $SEAMONKEY "file://$PWD/$1"
+               else
+                       exec $SEAMONKEY "$@"
+               fi
+       else
+               if [ -z "$1" ]; then
+                       exec $SEAMONKEY -remote 'xfeDoCommand(openBrowser)'
+               elif [ "$1" = "-mail" ]; then
+                       exec $SEAMONKEY -remote 'xfeDoCommand(openInbox)'
+               elif [ "$1" = "-compose" -o "$1" = "-editor" ]; then
+                       exec $SEAMONKEY -remote 'xfeDoCommand(composeMessage)'
+               else
+                       if [ -f "$PWD/$1" ]; then
+                               URL="file://$PWD/$1"
+                       else
+                               URL="$1"
+                       fi
+                       if ! grep -q browser.tabs.opentabfor.middleclick.*false ~/.seamonkey/*/prefs.js; then
+                               exec $SEAMONKEY -new-tab "$URL"
+                       else
+                               exec $SEAMONKEY -new-window "$URL"
+                       fi
+               fi
+       fi
+fi
This page took 0.102112 seconds and 4 git commands to generate.