stephan: server/kolab/kolab/namespace kolab,1.1,1.2

cvs at intevation.de cvs at intevation.de
Wed Nov 3 12:27:18 CET 2004


Author: stephan

Update of /kolabrepository/server/kolab/kolab/namespace
In directory doto:/tmp/cvs-serv25137/kolab/namespace

Modified Files:
	kolab 
Log Message:
Add utilities and further refinements for the namespace tool


Index: kolab
===================================================================
RCS file: /kolabrepository/server/kolab/kolab/namespace/kolab,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- kolab	2 Nov 2004 13:52:03 -0000	1.1
+++ kolab	3 Nov 2004 11:27:16 -0000	1.2
@@ -1,4 +1,4 @@
-#!/kolab/lib/openpkg/bash
+#!@l_prefix@/lib/openpkg/bash
 ##
 ##  Kolab Namespace tool 
 ##  Derived with acknowledgement from: openpkg -- OpenPKG Tool Chain
@@ -60,7 +60,7 @@
 ##
 
 #   determine path to OpenPKG instance
-openpkg_prefix="@l_prefix@"
+openpkg_prefix="/kolab"
 if [ ".${OPENPKG_PREFIX}" != . ]; then
     openpkg_prefix="${OPENPKG_PREFIX}"
 fi
@@ -128,17 +128,14 @@
     release=`${openpkg_prefix}/libexec/openpkg/rpm -q kolab`
     echo ""
     echo "${release} <http://www.kolab.org/>"
-    echo "Kolab Namespace Tool"
+    echo "Kolab Server Tool"
     echo ""
     echo "Copyright (c) 2004 Code Fusion cc."
-    echo "Derived from OpenPKG: Cross-Platform Unix Software Packaging Facility"
     echo ""
     echo "  \$ ${openpkg_prefix}/bin/kolab [<option> ...] \\"
     echo "     <command> [<command-option> ...] [<command-argument> ...]"
     echo ""
     echo "where <option> is one of the following global options:"
-    echo "  -p, --prefix    sets the Kolab/OpenPKG instance prefix   (also: \${OPENPKG_PREFIX})"
-    echo "  -t, --tools     sets the Kolab/OpenPKG tool chain prefix (also: \${KOLAB_TOOLS})"
     echo "  -v, --version   display Kolab version/release"
     echo "  -h, --help      display this usage help message"
     echo ""
@@ -164,7 +161,18 @@
                     id=`echo "${name}" | sed -e 's/-/_/g'`
                     eval "seen=\$__cmd_seen_${id}"
                     if [ ".${seen}" != .yes ]; then
-                        echo "${name}" | awk '{ printf("  %-15s (provided by add-on package)\n", $0); }'
+		    	#Try to get help
+			hashelp=`grep HASHELP ${openpkg_tools_cmdpath}/${name}`
+			if [ ".$hashelp" != "." ]; then
+				helpstring=`${openpkg_tools_cmdpath}/${name} --showhelp`
+			fi
+			if [ ".$helpstring" = "." ]; then
+	                        echo "${name}" | awk '{ printf("  %-15s (no help provided)\n", $0); }'
+			else
+	                        echo "${name}" | awk '{ printf("  %-15s ", $0); }'
+				echo "${helpstring}"
+			fi
+			hashelp=""; helpstring="";
                         eval "__cmd_seen_${id}=yes"
                     fi
                 fi
@@ -175,7 +183,7 @@
     echo ""
     echo "where <command-option> and <command-argument> are <command> specific"
     echo "options and arguments. Run \"${openpkg_prefix}/bin/kolab <command> --help\""
-    echo "and \"${openpkg_prefix}/bin/kolab openpkg man <command>\" for more details."
+    echo "and \"${openpkg_prefix}/bin/openpkg man <command>\" for more details."
     echo ""
     exit 0
 fi





More information about the commits mailing list