소스 검색

unconditionally include logic to handle -mail switch in shell wrapper instead of conditionally including it

Michael Schloh von Bennewitz 22 년 전
부모
커밋
f1c97899c0
2개의 변경된 파일17개의 추가작업 그리고 8개의 파일을 삭제
  1. 16 3
      mozilla/mozilla.sh
  2. 1 5
      mozilla/mozilla.spec

+ 16 - 3
mozilla/mozilla.sh

@@ -36,9 +36,10 @@ opt_t=no
 opt_r=""
 while [ ".$1" != . ]; do
     case $1 in
-        -v|--verbose ) opt_v=yes; shift ;;
-        -w|--window  ) opt_w=yes; shift ;;
-        -t|--tab     ) opt_t=yes; shift ;;
+        -m|-mail|--mail ) opt_m=yes; shift ;;
+        -v|--verbose    ) opt_v=yes; shift ;;
+        -w|--window     ) opt_w=yes; shift ;;
+        -t|--tab        ) opt_t=yes; shift ;;
         -r|-remote|--remote ) opt_r="$2"; shift; shift ;;
         -* ) echo "$0:ERROR: invalid option \"$1\"" 1>&2; exit 1 ;;
         * ) break ;;
@@ -66,6 +67,18 @@ if [ ".$opt_r" != . ]; then
     exec $mozilla_bin -remote "$opt_r"
 fi
 
+#   special case of direct email option
+if [ ".$opt_m" != . ]; then
+    $mozilla_bin -remote "ping()" >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        verbose "$mozilla_bin -remote \"xfeDoCommand(openInbox)\""
+        $mozilla_bin -remote "xfeDoCommand(openInbox)"
+    else
+        verbose "exec: $mozilla_bin -mail"
+        exec $mozilla_bin -mail
+    fi
+fi
+
 #   determine Mozilla run-time status
 $mozilla_bin -remote "ping()" >/dev/null 2>&1
 if [ $? -eq 0 ]; then

+ 1 - 5
mozilla/mozilla.spec

@@ -45,7 +45,6 @@ Source0:      ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla%{ve
 Source1:      ftp://ftp.openpkg.org/sources/CPY/mozilla/mozilla-1.4-libart.tar.bz2
 Source2:      mozilla.sh
 Source3:      mozilla.pod
-Source4:      mailnews.patch
 Patch0:       mozilla.patch
 
 #   build information
@@ -75,11 +74,8 @@ AutoReqProv:  no
     %setup -q -n mozilla
     %setup -q -n mozilla -D -T -a 1
 
-    #   patch source distribution and OpenPKG wrapper
+    #   patch source distribution
     %patch -p0
-%if "%{with_mailnews}" == "yes"
-    %{l_patch} <%{SOURCE mailnews.patch} %{SOURCE mozilla.sh}
-%endif
 
     #   strip down source distribution (save disk space)
     find . -type d -name "CVS" -print | xargs rm -rf