[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#541468: [PATCH] Re: install-info: update-info-dir - add option -h, --help



tags 541468 + patch
thanks

Following patch adds -h, --help options, documents them in manual page
(+ few wording improvements, SEE ALSO etc.)

>From 57fac07f952976d6bfc95345dac33fc0b29ca01e Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Fri, 14 Aug 2009 17:27:25 +0300
Subject: [PATCH] update-info-dir: Add options -h, --help. Improve manual page

Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 update-info-dir   |   17 +++++++++++++++++
 update-info-dir.8 |   33 +++++++++++++++++++--------------
 2 files changed, 36 insertions(+), 14 deletions(-)
 mode change 100644 => 100755 update-info-dir

diff --git a/update-info-dir b/update-info-dir
old mode 100644
new mode 100755
index 4778f52..dfeda77
--- a/update-info-dir
+++ b/update-info-dir
@@ -8,6 +8,23 @@ INFODIR=/usr/share/info
 
 set -e
 
+Help ()
+{
+    echo "\
+SYNOPSIS: update-info-dir [-h,--help] [info-directory]
+
+(re-)creates the index of available documentation in info format
+(the file /usr/share/info/dir) which is usually presented by info browsers
+on startup."
+
+    exit 0
+}
+
+
+if [ "$1" = "-h" ] || [ "$1" == "--help" ]; then
+    Help
+fi
+
 if [ -n "$1" ] ; then
   INFODIR="$1"
 fi
diff --git a/update-info-dir.8 b/update-info-dir.8
index 385d70e..6792520 100644
--- a/update-info-dir.8
+++ b/update-info-dir.8
@@ -2,28 +2,33 @@
 .\" NAME should be all caps, SECTION should be 1-8, maybe w/ subsection
 .\" other parms are allowed: see man(7), man(1)
 .SH NAME
-update-info-dir \- (re-)create /usr/share/info/dir from all installed info files
+update-info-dir \- update or create index file
+from all installed info files in directory
 .SH SYNOPSIS
 .B update-info-dir
 .I "[options]"
+.B [directory]
 .br
 .SH DESCRIPTION
-This manual page documents briefly the
-.BR update-info-dir
-command.
-This manual page was written for the Debian GNU/Linux distribution
-because the original script was designed for Debian packaging system.
-.PP
-.B update-info-dir [info-directory]
-(re-)creates the index of available documentation in info format
-(the file /usr/share/info/dir) which is usually presented by info browsers
-on startup.
+Update, or create, the index file
+.I dir
+of available documentation in
+/usr/share/info/ (the default) or in given DIRECTORY. The
+index file
+.I info
+is the directory is usually presented by info browsers on startup.
 .SH OPTIONS
 .TP
-.B info-directory
-If an argument is given update the dir file in the directory given, otherwise
-use /usr/share/info.
+.B \-h,--help
+Display help and exit.
 .PP
+.SH SEE ALSO
+emacs(1)
+info(1)
+install-info(1)
 .SH AUTHOR
 This manual page was written by Norbert Preining <preining@logic.at>,
 for the Debian GNU/Linux system (but may be used by others).
+
+This manual page was written for the Debian GNU/Linux distribution
+because the original script was designed for Debian packaging system.
-- 
1.6.3.3


Reply to: