merge_copyrights revision 6376f6189950156cc1488c86f22b19dd4feec11c
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# Copyright (C) 2004-2007, 2009-2015 Internet Systems Consortium, Inc. ("ISC")
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# Copyright (C) 1998-2001, 2003 Internet Software Consortium.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# Permission to use, copy, modify, and/or distribute this software for any
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# purpose with or without fee is hereby granted, provided that the above
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# copyright notice and this permission notice appear in all copies.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
3e02c9e33656dcd9c364633d42dd785d3e6fdd66Automatic Updater# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater# PERFORMANCE OF THIS SOFTWARE.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updateropen(COPYRIGHTS, "<util/copyrights") || die "can't open ./util/copyrights: $!";
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updatermy ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = gmtime(time());
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater$sec = $min = $hour = $mday = $mon = $wday = $yday = $isdst = 0;
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updateropen(FILES, "git ls-files | sed 's;^;./;' |") || die "git ls-files: $!";
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updateropen(CHANGES, "sh util/recent_changes.sh |") || die "recent_changes.sh: $!";
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater # Strip any .in extension to find out the file's real type.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater # .in files are processed by configure to produce the target file.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater # Contributed code should maintain its own copyright.
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater } elsif ($base =~ /\.\/unit\/atf-src\//) {
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater } elsif ($base =~ /\/openssl-[a-z0-9.]*-patch$/) {
7717ec7a6a898cdd3c35cbfba66010b7304ffd9bAutomatic Updater } elsif ($base =~ /doc\/arm\/.*\.html$/) {
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater } elsif ($base =~ /\/(named|rndc|good|bad).{0,2}\.conf$/) {
a3f8c8e20780e488141d200acdfea6c5f3303513Automatic Updater } elsif ($base =~ /\/checkconf\/(good|bad)-.*\.conf$/) {
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater } elsif ($base =~ /(\/\.(gitignore|gitattributes)|Atffile|\.(gif|jpg))$/i) {
6f1205897504b8f50b1785975482c995888dd630Tinderbox User } elsif ($base =~ /\.(def|dep|dsp|dsw|mak|sln)$/i) {
6f1205897504b8f50b1785975482c995888dd630Tinderbox User } elsif ($base =~ /\.(vcxproj(|\.(user|filters)))$/i) {
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater my $m_year = int(`sh util/file_year.sh $_`);
cd32f419a8a5432fbb139f56ee73cbf68b9350ccTinderbox User print "$_: must set copyright year(s) manually\n";
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater if (! defined($file_years{$_}) || $file_years{$_} eq "????") {
2895f101b5585a19015ac2c2c1e1812ac467fa12Automatic Updater print "$_: must set copyright year(s) manually\n";
590c12cfe3b9a179ab2faa1be791a069c81882e0Automatic Updater # track the modification years even if we are not going to be
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updateropen(NEWCOPYRIGHTS, ">util/newcopyrights") ||
f8e3e03cacd16ffb923a9603fca23a9e1a1fee07Automatic Updaterforeach my $file (sort(keys(%file_types))) {
3acf5eb97cebc2ba868e6ac4a4e01e6d1be0c892Automatic Updater printf NEWCOPYRIGHTS "%s\t%s\n", $file_types{$file}, $file_years{$file};
3acf5eb97cebc2ba868e6ac4a4e01e6d1be0c892Automatic Updater if (($file_years{$file} eq "????") || ($file_types{$file} eq "?")) {
3acf5eb97cebc2ba868e6ac4a4e01e6d1be0c892Automatic Updater print "Unknown file type or year: $file\n";