]> git.pld-linux.org Git - packages/seamonkey.git/commitdiff
- start script uses exec now, and simplified a little
authorsparky <sparky@pld-linux.org>
Sun, 10 Sep 2006 11:59:45 +0000 (11:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    seamonkey.spec -> 1.41

seamonkey.spec

index b39b464bf46670f013df9a72ae7f2f37575a2a86..20aeb042ce79811404b7787e7e46b474c466433c 100644 (file)
@@ -379,44 +379,45 @@ cat << 'EOF' > $RPM_BUILD_ROOT%{_bindir}/seamonkey
 LD_LIBRARY_PATH=%{_seamonkeydir}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
 export LD_LIBRARY_PATH
 
-MOZILLA_FIVE_HOME=%{_seamonkeydir}
+MOZILLA_FIVE_HOME="%{_seamonkeydir}"
+SEAMONKEY="$MOZILLA_FIVE_HOME/seamonkey-bin"
 if [ "$1" == "-remote" ]; then
-       %{_seamonkeydir}/seamonkey-bin "$@"
-else
-       PING=`%{_seamonkeydir}/seamonkey-bin -remote 'ping()' 2>&1 >/dev/null`
-       if [ -n "$PING" ]; then
-               if [ -f "`pwd`/$1" ]; then
-                       %{_seamonkeydir}/seamonkey-bin "file://`pwd`/$1"
-               else
-                       %{_seamonkeydir}/seamonkey-bin "$@"
-               fi
+       exec $SEAMONKEY "$@"
+fi
+
+PING=`$SEAMONKEY -remote 'ping()' 2>&1 >/dev/null`
+if [ -n "$PING" ]; then
+       if [ -f "`pwd`/$1" ]; then
+               exec $SEAMONKEY "file://`pwd`/$1"
        else
-               if [ -z "$1" ]; then
-                       %{_seamonkeydir}/seamonkey-bin -remote 'xfeDoCommand (openBrowser)'
-               elif [ "$1" == "-mail" ]; then
-                       %{_seamonkeydir}/seamonkey-bin -remote 'xfeDoCommand (openInbox)'
-               elif [ "$1" == "-compose" ]; then
-                       %{_seamonkeydir}/seamonkey-bin -remote 'xfeDoCommand (composeMessage)'
-               else
-                       echo $1 | grep -q "^-" > /dev/null
-                       if [ $? -eq 0 ]; then
-                               %{_seamonkeydir}/seamonkey-bin "$@"
-                       else
-                               if [ -f "`pwd`/$1" ]; then
-                                       URL="file://`pwd`/$1"
-                               else
-                                       URL="$1"
-                               fi
-                               grep browser.tabs.opentabfor.middleclick ~/.mozilla/default/*/prefs.js | grep true > /dev/null
-                               if [ $? -eq 0 ]; then
-                                       %{_seamonkeydir}/seamonkey-bin -remote "OpenUrl($URL,new-tab)"
-                               else
-                                       %{_seamonkeydir}/seamonkey-bin -remote "OpenUrl($URL,new-window)"
-                               fi
-                       fi
-               fi
+               exec $SEAMONKEY "$@"
        fi
 fi
+
+if [ -z "$1" ]; then
+       exec $SEAMONKEY -remote 'xfeDoCommand (openBrowser)'
+elif [ "$1" == "-mail" ]; then
+       exec $SEAMONKEY -remote 'xfeDoCommand (openInbox)'
+elif [ "$1" == "-compose" ]; then
+       exec $SEAMONKEY -remote 'xfeDoCommand (composeMessage)'
+fi
+
+[[ $1 == -* ]] && exec $SEAMONKEY "$@"
+
+if [ -f "`pwd`/$1" ]; then
+       URL="file://`pwd`/$1"
+else
+       URL="$1"
+fi
+if grep -q -E 'browser.tabs.opentabfor.middleclick.*true' \
+               ~/.mozilla/default/*/prefs.js; then
+       exec $SEAMONKEY -remote "OpenUrl($URL,new-tab)"
+else
+       exec $SEAMONKEY -remote "OpenUrl($URL,new-window)"
+fi
+
+echo "Cannot execute SeaMonkey ($SEAMONKEY)!" >&2
+exit 1
 EOF
 
 cat << 'EOF' > $RPM_BUILD_ROOT%{_sbindir}/%{name}-chrome+xpcom-generate
This page took 0.096929 seconds and 4 git commands to generate.