Package: ikiwiki
Version: 2.53.2
Severity: normal
Tags: patch

I can't seem to remember the exact spelling ikiwiki uses for the
'--setup' option.  This would be insignificant if the usage() message
would remind me to eliminate the need to search the manpage each time
I update my wiki.

The attached patch updates the usage() function to include the
alternative form for running ikiwiki with --setup.  It also adds the
options --help and -h for a user to explicitly request the brief usage
message.

-Derrick

-- 
"Open Source Software - Sometimes you get more than you paid for..."
 
www: http://dman13.dyndns.org/                  jabber: [EMAIL PROTECTED]
--- ikiwiki.in.orig	2008-09-26 06:08:27.000000000 -0400
+++ ikiwiki.in	2008-09-26 06:15:10.000000000 -0400
@@ -10,7 +10,10 @@
 use IkiWiki;
 
 sub usage () { #{{{
-	die gettext("usage: ikiwiki [options] source dest"), "\n";
+	die gettext("usage: ikiwiki [options] source dest"),
+            "\n",
+            gettext("       ikiwiki --setup <configfile>"),
+            "\n";
 } #}}}
 
 sub getconfig () { #{{{
@@ -19,6 +22,7 @@
 		eval q{use Getopt::Long};
 		Getopt::Long::Configure('pass_through');
 		GetOptions(
+			"help|h" => \$config{help},
 			"setup|s=s" => \$config{setup},
 			"wikiname=s" => \$config{wikiname},
 			"verbose|v!" => \$config{verbose},
@@ -111,7 +115,12 @@
 
 sub main () { #{{{
 	getconfig();
-	
+
+	if ($config{help}) {
+            usage();
+            # will die in call to usage()
+	}
+
 	if ($config{setup}) {
 		require IkiWiki::Setup;
 		setup();

Attachment: signature.asc
Description: Digital signature

Reply via email to