Author: jamessan
Date: 2009-08-03 20:06:12 +0000 (Mon, 03 Aug 2009)
New Revision: 1954
Modified:
trunk/debian/changelog
trunk/scripts/grep-excuses.1
trunk/scripts/grep-excuses.pl
Log:
grep-excuses: Document that -w only works with a package name.
Also moved the $DEBFULLNAME code after the code that handles -w so we get a
proper error message when no arguments were given to grep-excuses.
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-08-03 15:10:50 UTC (rev 1953)
+++ trunk/debian/changelog 2009-08-03 20:06:12 UTC (rev 1954)
@@ -3,6 +3,7 @@
[ James Vega ]
* debchange: Clarify the wording for the explanation of
--force-save-on-release. (Closes: #539155)
+ * grep-excuses: Document that -w only works with a package name.
[ Adam D. Barratt ]
* bts:
Modified: trunk/scripts/grep-excuses.1
===================================================================
--- trunk/scripts/grep-excuses.1 2009-08-03 15:10:50 UTC (rev 1953)
+++ trunk/scripts/grep-excuses.1 2009-08-03 20:06:12 UTC (rev 1954)
@@ -17,7 +17,8 @@
first option given on the command-line.
.TP
\fB\-\-wipnity\fR, \fB\-w\fR
-Get information from <http://release.debian.org/migration/>.
+Get information from <http://release.debian.org/migration/>. A package name
+must be given when using this option.
.TP
.B \-\-help
Show a brief usage message.
Modified: trunk/scripts/grep-excuses.pl
===================================================================
--- trunk/scripts/grep-excuses.pl 2009-08-03 15:10:50 UTC (rev 1953)
+++ trunk/scripts/grep-excuses.pl 2009-08-03 20:06:12 UTC (rev 1954)
@@ -32,9 +32,9 @@
# Load the Term::Size module safely
eval { require Term::Size; };
if ($@) {
- if ($@ =~ /^Can\'t locate Term\/Size\.pm/) {
+ if ($@ =~ /^Can\'t locate Term\/Size\.pm/) {
$term_size_broken="the libterm-size-perl package is not installed";
- } else {
+ } else {
$term_size_broken="couldn't load Term::Size: $@";
}
} else {
@@ -64,7 +64,8 @@
Options:
--no-conf, --noconf Don\'t read devscripts config files;
must be the first option given
- --wipnity, -w Check <http://release.debian.org/migration/>
+ --wipnity, -w Check <http://release.debian.org/migration/>. A package
+ name must be given when using this option.
--help Show this help
--version Give version information
@@ -133,22 +134,18 @@
$string = $config_vars{'GREP_EXCUSES_MAINTAINER'};
}
-if (! $string and exists $ENV{'DEBFULLNAME'}) {
- $string = $ENV{'DEBFULLNAME'};
-}
-
while (@ARGV and $ARGV[0] =~ /^-/) {
if ($ARGV[0] eq '--wipnity' or $ARGV[0] eq '-w') {
if (@ARGV) {
- shift;
- $string=shift;
- }
+ shift;
+ $string=shift;
+ }
if (! $string or $string eq '') {
- die "$progname: no maintainer or package specified!\nTry $progname
--help for help.\n";
- }
- if (@ARGV) {
- die "$progname: too many arguments! Try $progname --help for
help.\n";
- } else { wipnity($string); exit 0; }
+ die "$progname: no package specified!\nTry $progname --help for
help.\n";
+ }
+ if (@ARGV) {
+ die "$progname: too many arguments! Try $progname --help for
help.\n";
+ } else { wipnity($string); exit 0; }
}
if ($ARGV[0] eq '--help') { usage(); exit 0; }
if ($ARGV[0] eq '--version') { print $version; exit 0; }
@@ -158,6 +155,10 @@
die "$progname: unrecognised option $ARGV[0]; try $progname --help for
help\n";
}
+if (! $string and exists $ENV{'DEBFULLNAME'}) {
+ $string = $ENV{'DEBFULLNAME'};
+}
+
if (@ARGV) {
$string=shift;
}
@@ -174,7 +175,7 @@
if (system("command -v wget >/dev/null 2>&1") != 0) {
die "$progname: this program requires the wget package to be installed\n";
}
-
+
open EXCUSES, "wget -q -O - $url | zcat |" or
die "$progname: wget | zcat failed: $!\n";
--
To unsubscribe, send mail to [email protected].