summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2022-01-09 22:28:04 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-01-09 22:28:04 +0100
commitdbde76bdd6018ba68bf7192a514e4048f014cea3 (patch)
tree1ba9b5a01049ae940a287c55b6369f323307ea20 /scripts
parentd8218d45e46755356d52c713172ecc381c44eaf1 (diff)
downloadcurl-dbde76bdd6018ba68bf7192a514e4048f014cea3.tar.gz
scripts/copyright.pl: ignore missing files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/copyright.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/copyright.pl b/scripts/copyright.pl
index 089f04a9e..878f228c2 100755
--- a/scripts/copyright.pl
+++ b/scripts/copyright.pl
@@ -88,8 +88,7 @@ sub scanfile {
my ($f) = @_;
my $line=1;
my $found = 0;
- open(F, "<$f") ||
- print ERROR "can't open $f\n";
+ open(F, "<$f") || return -1;
while (<F>) {
chomp;
my $l = $_;
@@ -120,9 +119,14 @@ sub checkfile {
@copyright=();
my $found = scanfile($file);
- if(!$found) {
- print "$file:1: missing copyright range\n";
- return 2;
+ if($found < 1) {
+ if(!$found) {
+ 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;