scripts/copyright.pl: ignore missing files
This commit is contained in:
parent
d8218d45e4
commit
dbde76bdd6
@ -88,8 +88,7 @@ sub scanfile {
|
|||||||
my ($f) = @_;
|
my ($f) = @_;
|
||||||
my $line=1;
|
my $line=1;
|
||||||
my $found = 0;
|
my $found = 0;
|
||||||
open(F, "<$f") ||
|
open(F, "<$f") || return -1;
|
||||||
print ERROR "can't open $f\n";
|
|
||||||
while (<F>) {
|
while (<F>) {
|
||||||
chomp;
|
chomp;
|
||||||
my $l = $_;
|
my $l = $_;
|
||||||
@ -120,9 +119,14 @@ sub checkfile {
|
|||||||
@copyright=();
|
@copyright=();
|
||||||
my $found = scanfile($file);
|
my $found = scanfile($file);
|
||||||
|
|
||||||
if(!$found) {
|
if($found < 1) {
|
||||||
print "$file:1: missing copyright range\n";
|
if(!$found) {
|
||||||
return 2;
|
print "$file:1: missing copyright range\n";
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
# this means the file couldn't open - it might not exist, consider
|
||||||
|
# that fine
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
my $commityear = undef;
|
my $commityear = undef;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user