Author: adsb
Date: 2009-02-12 23:25:07 +0000 (Thu, 12 Feb 2009)
New Revision: 1822
Modified:
trunk/debian/changelog
trunk/scripts/licensecheck.pl
Log:
* licensecheck:
+ Document --no-conf.
+ Fix an uninitialised variable warning when --no-conf is used. Thanks.
Cristian Greco. (Closes: #515047)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-02-12 20:23:32 UTC (rev 1821)
+++ trunk/debian/changelog 2009-02-12 23:25:07 UTC (rev 1822)
@@ -1,6 +1,9 @@
devscripts (2.10.47) UNRELEASED; urgency=low
- * NOT RELEASED YET
+ * licensecheck:
+ + Document --no-conf.
+ + Fix an uninitialised variable warning when --no-conf is used. Thanks.
+ Cristian Greco. (Closes: #515047)
-- Adam D. Barratt <[email protected]> Thu, 12 Feb 2009 20:23:12 +0000
Modified: trunk/scripts/licensecheck.pl
===================================================================
--- trunk/scripts/licensecheck.pl 2009-02-12 20:23:32 UTC (rev 1821)
+++ trunk/scripts/licensecheck.pl 2009-02-12 23:25:07 UTC (rev 1822)
@@ -27,9 +27,9 @@
B<licensecheck> B<--help|--version>
-B<licensecheck> [B<--verbose>] [B<--copyright>] [B<-l|--lines=N>]
-[B<-i|--ignore=regex>] [B<-c|--check=regex>] [B<-r|--recursive>]
-I<list of files and directories to check>
+B<licensecheck> [B<--no-conf>] [B<--verbose>] [B<--copyright>]
+[B<-l|--lines=N>] [B<-i|--ignore=regex>] [B<-c|--check=regex>]
+[B<-r|--recursive>] I<list of files and directories to check>
=head1 DESCRIPTION
@@ -78,6 +78,10 @@
Also display copyright text found within the file
+=item B<--no-conf> B<--noconf>
+Do not read any configuration files. This can only be used as the first
+option given on the command-line.
+
=back
=head1 CONFIGURATION VARIABLES
@@ -155,7 +159,8 @@
my $modified_conf_msg;
-my ($opt_verbose, $opt_lines, $opt_noconf, $opt_ignore_regex,
$opt_check_regex);
+my ($opt_verbose, $opt_lines, $opt_noconf, $opt_ignore_regex, $opt_check_regex)
+ = ('', '', '', '', '');
my $opt_recursive = 0;
my $opt_copyright = 0;
my ($opt_help, $opt_version);
@@ -218,9 +223,9 @@
)
or die "Usage: $progname [options] filelist\nRun $progname --help for more
details\n";
-$opt_lines =~ /^[1-9][0-9]*$/ or $opt_lines = $def_lines;
-$opt_ignore_regex = $default_ignore_regex if !$opt_ignore_regex;
-$opt_check_regex = $default_check_regex if !$opt_check_regex;
+$opt_lines = $def_lines if $opt_lines !~ /^[1-9][0-9]*$/;
+$opt_ignore_regex = $default_ignore_regex if ! length $opt_ignore_regex;
+$opt_check_regex = $default_check_regex if ! length $opt_check_regex;
if ($opt_noconf) {
fatal "--no-conf is only acceptable as the first command-line option!";
@@ -339,6 +344,8 @@
Valid options are:
--help, -h Display this message
--version, -v Display version and copyright info
+ --no-conf, --noconf Don't read devscripts config files; must be
+ the first option given
--verbose Display the header of each file before its
license information
--lines, -l Specify how many lines of the file header
--
To unsubscribe, send mail to [email protected].