The following commit has been merged in the master branch:
commit 4130db31b4777b2bd23f0f293b531f622e763d17
Author: Francesco Poli (wintermute) <[email protected]>
Date:   Sat Dec 1 23:23:54 2012 +0100

    licensecheck: Fix --check and --ignore options
    
    Signed-off-by: James McCoy <[email protected]>

diff --git a/scripts/licensecheck.pl b/scripts/licensecheck.pl
index 31d3ac2..4a3c291 100755
--- a/scripts/licensecheck.pl
+++ b/scripts/licensecheck.pl
@@ -168,8 +168,8 @@ my %OPT=(
     verbose        => '',
     lines          => '',
     noconf         => '',
-    ignore_regex   => '',
-    check_regex    => '',
+    ignore         => '',
+    check          => '',
     recursive      => 0,
     copyright      => 0,
     machine        => 0,
@@ -235,8 +235,8 @@ GetOptions(\%OPT,
 ) or die "Usage: $progname [options] filelist\nRun $progname --help for more 
details\n";
 
 $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'};
+$OPT{'ignore'} = $default_ignore_regex if ! length $OPT{'ignore'};
+$OPT{'check'} = $default_check_regex if ! length $OPT{'check'};
 
 if ($OPT{'noconf'}) {
     fatal("--no-conf is only acceptable as the first command-line option!");
@@ -264,15 +264,15 @@ while (@ARGV) {
 
        while (<$FIND>) {
            chomp;
-           next unless m%$OPT{'check_regex'}%;
+           next unless m%$OPT{'check'}%;
            # Skip empty files
            next if (-z $_);
-           push @files, $_ unless m%$OPT{'ignore_regex'}%;
+           push @files, $_ unless m%$OPT{'ignore'}%;
        }
        close $FIND;
     } else {
-       next unless ($files_count == 1) or $file =~ m%$OPT{'check_regex'}%;
-       push @files, $file unless $file =~ m%$OPT{'ignore_regex'}%;
+       next unless ($files_count == 1) or $file =~ m%$OPT{'check'}%;
+       push @files, $file unless $file =~ m%$OPT{'ignore'}%;
     }
 }
 

-- 
Git repository for devscripts

_______________________________________________
devscripts-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel

Reply via email to