c20b798
commit 0712e5233c1e6c452f5c888351870047673f0da6
c20b798
Author: Michal Svec <msvec@novell.com>
c20b798
Date:   Tue Jul 12 14:16:42 2011 +0200
c20b798
c20b798
    Do not pass the request for command line help to oosplash
c20b798
    
c20b798
    - both of these work now: 'libreoffice -h' and 'libreoffice --help'
c20b798
    - added two more options: 'libreoffice -V' and 'libreoffice --version'
c20b798
    - all of these options work even if there are instances running
c20b798
    - there's no 1s delay between startup and actual output
c20b798
c20b798
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
c20b798
index a97f68d..b23d452 100755
c20b798
--- a/desktop/scripts/soffice.sh
c20b798
+++ b/desktop/scripts/soffice.sh
c20b798
@@ -97,5 +97,21 @@ AIX)
c20b798
     ;;
c20b798
 esac
c20b798
 
c20b798
+# do not pass the request for command line help to oosplash
c20b798
+if test "$#" -eq 1; then
c20b798
+    case "$1" in
c20b798
+        -h | --h | --he | --hel | --help)
c20b798
+            "$sd_prog/soffice.bin" --help
c20b798
+            exit 0
c20b798
+            ;;
c20b798
+        -V | --v | --ve | --ver | --vers | --versi | --versio | --version)
c20b798
+            "$sd_prog/soffice.bin" --version
c20b798
+            exit 0
c20b798
+            ;;
c20b798
+        *)
c20b798
+            ;;
c20b798
+    esac
c20b798
+fi
c20b798
+
c20b798
 # oosplash does the rest: forcing pages in, javaldx etc. are
c20b798
 exec $VALGRINDCHECK "$sd_prog/oosplash.bin" "$@"