#! /bin/sh /usr/share/dpatch/dpatch-run
## 26-help-param.dpatch by Jonathan Wiltshire <debian@jwiltshire.org.uk>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Patch to handle the --help parameter instead of assuming
## DP: it is a package name.
## DP: Patch from Steve Cotton <steve0001@s.cotton.clara.co.uk>
## DP: Status: Forwarded upstream to phi1ipp@yahoo.com

@DPATCH@
diff -urNad whohas-0.23~/program/whohas whohas-0.23/program/whohas
--- whohas-0.23~/program/whohas	2009-02-22 23:06:29.000000000 +0000
+++ whohas-0.23/program/whohas	2009-02-22 23:08:12.000000000 +0000
@@ -76,17 +76,24 @@
 my @option_distro;
 my $option_nothreads;
 my $option_shallow;
+my $option_help;
 
 GetOptions(
 	"d=s" => \@option_distro,
 	"no-threads" => \$option_nothreads,
 	"shallow" => \$option_shallow,
+	"help|usage|h" => \$option_help,
 );
 $useThreads = !$option_nothreads;
 $goDeep = !$option_shallow;
 
+if ($option_help) {
+	print "Usage: $0 [--no-threads] [--shallow] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n";
+	exit 0;
+}
+
 if (@ARGV > 1) {
-	die "Error:\tToo many parameters. Usage: $0 [--no-threads] [-d Dist1[,Dist2[,Dist3...]]] pkgname\n";
+	die "Error:\tToo many parameters. Usage: $0 [--no-threads] [--shallow]  [-d Dist1[,Dist2[,Dist3...]]] pkgname\n";
 } elsif (@ARGV < 1) {
 	die "Error:\tPlease specify a search term.\n";
 }
