[SCM] Debian Live build scripts branch, master, updated. 1.0.2-4-41-g7f9d869

Daniel Baumann daniel at debian.org
Fri Jan 30 17:17:31 UTC 2009


The following commit has been merged in the master branch:
commit 7f9d8692d69ef1e3aeb304c1e08ddbaf5f35b9d8
Author: Daniel Baumann <daniel at debian.org>
Date:   Fri Jan 30 18:16:59 2009 +0100

    Automatically displaying manpage when calling a helper with -h or --help.

diff --git a/functions/arguments.sh b/functions/arguments.sh
index b2e4c92..bbc439c 100755
--- a/functions/arguments.sh
+++ b/functions/arguments.sh
@@ -43,7 +43,7 @@ Arguments ()
 				;;
 
 			-h|--help)
-				Help
+				Man
 				shift
 				;;
 
diff --git a/functions/common.sh b/functions/man.sh
similarity index 64%
copy from functions/common.sh
copy to functions/man.sh
index 415cd73..72213e2 100755
--- a/functions/common.sh
+++ b/functions/man.sh
@@ -1,14 +1,17 @@
 #!/bin/sh
 
-# common.sh - common things for all live-helpers
+# man.sh - print man information
 # Copyright (C) 2006-2009 Daniel Baumann <daniel at debian.org>
 #
 # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
 # This is free software, and you are welcome to redistribute it
 # under certain conditions; see COPYING for details.
 
-PROGRAM="$(basename ${0})"
-PACKAGE="live-helper"
-VERSION="1.0.2-3"
-
-PATH="${PWD}/scripts:${PATH}"
+Man ()
+{
+	if [ -x "$(which man 2>/dev/null)" ]
+	then
+		man $(basename ${0})
+		exit 0
+	fi
+}
diff --git a/helpers/lh b/helpers/lh
index ca8397a..7b27c2d 100755
--- a/helpers/lh
+++ b/helpers/lh
@@ -31,7 +31,7 @@ USAGE="FIXME"
 
 case "${1}" in
 	-h|--help)
-		Help
+		Man
 		;;
 
 	-u|--usage)

-- 
Debian Live build scripts



More information about the debian-live-changes mailing list