merge_copyrights revision bc6f4c1c4c1b739fd06d2de05b77b9d08c4d8a5a
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# Copyright (C) 1998-2001, 2003-2007, 2009-2017 Internet Systems Consortium, Inc. ("ISC")
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# This Source Code Form is subject to the terms of the Mozilla Public
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# License, v. 2.0. If a copy of the MPL was not distributed with this
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# file, You can obtain one at http://mozilla.org/MPL/2.0/.
ea94d370123a5892f6c47a97f21d1b28d44bb168Tinderbox Useropen(COPYRIGHTS, "<util/copyrights") || die "can't open ./util/copyrights: $!";
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinmy ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein$sec = $min = $hour = $mday = $mon = $wday = $yday = $isdst = 0;
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinopen(FILES, "git ls-files | sed 's;^;./;' |") || die "git ls-files: $!";
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinopen(CHANGES, "sh util/recent_changes.sh |") || die "recent_changes.sh: $!";
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # Strip any .in extension to find out the file's real type.
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User # .in files are processed by configure to produce the target file.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # Contributed code should maintain its own copyright.
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User } elsif ($base =~ /\/openssl-[a-z0-9.]*-patch$/) {
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $base =~ s/\.[0-9]$//;
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein } elsif ($base =~ /\/(named|rndc|good|bad).{0,2}\.conf$/) {
5d564da348e890e42f63eebf2dced9a05b41f4fbTinderbox User } elsif ($base =~ /\/checkconf\/(good|bad)-.*\.conf$/) {
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User } elsif ($base =~ /(\/\.(gitignore|gitattributes)|Atffile|\.(gif|jpg))$/i) {
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein } elsif ($base =~ /\.(def|dep|dsp|dsw|mak|sln)$/i) {
5d564da348e890e42f63eebf2dced9a05b41f4fbTinderbox User } elsif ($base =~ /\.(vcxproj(|\.(user|filters)))$/i) {
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic Updater my $m_year = int(`sh util/file_year.sh $_`);
44d0f0256fbdce130a18655023c3b06bacacbd61Automatic Updater if (($file_types{$_} eq "MAN" || $file_types{$_} eq "HTML") &&
bbbf2e27d3a981163dab139497d6b2dc85449db0Tinderbox User print "$_: must set copyright year(s) manually\n";
5091a6fed939d70cc5ae90a8ddecf2a829cdbabaTinderbox User if (! defined($file_years{$_}) || $file_years{$_} eq "????") {
5091a6fed939d70cc5ae90a8ddecf2a829cdbabaTinderbox User print "$_: must set copyright year(s) manually\n";
5091a6fed939d70cc5ae90a8ddecf2a829cdbabaTinderbox User # track the modification years even if we are not going to be
d9184858dd5d7677050a813d444c281c56f697aaTinderbox User printf NEWCOPYRIGHTS "%s\t%s\n", $file_types{$file}, $file_years{$file};
5d564da348e890e42f63eebf2dced9a05b41f4fbTinderbox User if (($file_years{$file} eq "????") || ($file_types{$file} eq "?")) {