mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
cope with lines that don't have a year on them without causing perl warnings.
provide automatic type for rndc.conf files.
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
# ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
||||
# SOFTWARE.
|
||||
|
||||
# $Id: merge_copyrights,v 1.12 2000/06/28 22:00:38 tale Exp $
|
||||
# $Id: merge_copyrights,v 1.13 2000/07/27 03:27:35 tale Exp $
|
||||
|
||||
%file_types = ();
|
||||
%file_years = ();
|
||||
@@ -64,7 +64,7 @@ while (<FILES>) {
|
||||
$file_types{$_} = "MAN";
|
||||
} elsif ($base =~ /\/Makefile$/) {
|
||||
$file_types{$_} = "MAKE";
|
||||
} elsif ($base =~ /\/named.?\.conf$/) {
|
||||
} elsif ($base =~ /\/(named|rndc).?\.conf$/) {
|
||||
$file_types{$_} = "CONF-C";
|
||||
} elsif ($base =~ /\/resolv.?\.conf$/) {
|
||||
$file_types{$_} = "CONF-SH";
|
||||
@@ -94,9 +94,14 @@ while (<FILES>) {
|
||||
$dev = $ino = $mode = $nlink = $uid = $gid = $rdev = $size = 0;
|
||||
$atime = $blksize = $blocks = 0;
|
||||
} else {
|
||||
if ($file_types{$_} eq "X" || $file_years{$_} eq "????") {
|
||||
next;
|
||||
}
|
||||
if (! defined($file_years{$_}) || $file_years{$_} eq "????") {
|
||||
print "$_: must set copyright year(s) manually\n";
|
||||
$file_years{$_} = "????";
|
||||
next;
|
||||
}
|
||||
|
||||
next if $file_types{$_} eq "X";
|
||||
|
||||
@years = split(/,/, $file_years{$_});
|
||||
$has_current = 0;
|
||||
foreach $fyear (@years) {
|
||||
|
Reference in New Issue
Block a user