merge_copyrights revision ebb4655236b95b36982d999800497d2dd3096a7f
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews# Copyright (C) 1998-2001, 2003-2007, 2009-2018 Internet Systems Consortium, Inc. ("ISC")
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# This Source Code Form is subject to the terms of the Mozilla Public
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# License, v. 2.0. If a copy of the MPL was not distributed with this
fb84f9014321c5f33c4682de5661b579fcde318fAndreas Gustafsson# 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: $!";
b46346eb3026ba4bebc093bc93cfe159131e541eTinderbox Useropen(CHANGES, "sh util/recent_changes.sh |") || die "recent_changes.sh: $!";
3afd0ff6628df1e7e20161e4afa99469a1195a5bTinderbox User # Strip any .in extension to find out the file's real type.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # .in files are processed by configure to produce the target file.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # Contributed code should maintain its own copyright.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein } elsif ($base =~ /\/openssl-[a-z0-9.]*-patch$/) {
b3cbb2f1ad021349e89807f3492df6e4e679cd56Mark Andrews $file_types{$_} = "PYTHON-BIN" if ($line && $line =~ /^#!/);
d8620c7234281056fdfd2ee40cf16636b8281092Tinderbox User $base =~ s/\.[0-9]$//;
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /\/(named|rndc|good|bad).{0,2}\.conf$/) {
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /\/checkconf\/(good|bad)-.*\.conf$/) {
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /(\/\.(gitignore|gitattributes)|Atffile|Kyuafile|\.(gif|jpg))$/i) {
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /\.(def|dep|dsp|dsw|mak|sln)$/i) {
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /\.(vcxproj(|\.(user|filters)))$/i) {
6bcac4b58d16ee91184a72bd4ff05c41538fd932Tinderbox User } elsif ($base =~ /\/doc\/misc\/[-a-z]*\.zoneopt$/i) {
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if (($file_types{$_} eq "MAN" || $file_types{$_} eq "HTML") &&
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein print "$_: must set copyright year(s) manually\n";
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein if (! defined($file_years{$_}) || $file_years{$_} eq "????") {
a1b05dea35aa30b152a47115e18bbe679d3fcf19Mark Andrews print "$_: must set copyright year(s) manually\n";
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein # track the modification years even if we are not going to be
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein printf NEWCOPYRIGHTS "%s\t%s\n", $file_types{$file}, $file_years{$file};
a057e8e33baa5fa369be28a9680585200ce3ff73Mark Andrews if (($file_years{$file} eq "????") || ($file_types{$file} eq "?")) {