]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Generated the list of missing files on the fly.
authorDavid Lawrence <source@isc.org>
Thu, 22 Jun 2000 17:45:50 +0000 (17:45 +0000)
committerDavid Lawrence <source@isc.org>
Thu, 22 Jun 2000 17:45:50 +0000 (17:45 +0000)
Automatically identify .css, .y, .pl, .sh, .html, .man, named.conf,
        resolv.conf, .db, .hint, .gif and .jpg.

util/merge_copyrights

index 269a5342bd1065d51e78bcec9a61a32bc58d9a9a..d64e307507d28f4d62f3c3929aed12becc623250 100644 (file)
@@ -1,6 +1,6 @@
 #!/usr/local/bin/perl -w
 #
-# Copyright (C) 1998, 1999, 2000  Internet Software Consortium.
+# Copyright (C) 1998-2000  Internet Software Consortium.
 # 
 # Permission to use, copy, modify, and distribute this software for any
 # purpose with or without fee is hereby granted, provided that the above
@@ -18,7 +18,7 @@
 %file_types = ();
 %file_years = ();
 
-open(COPYRIGHTS, "<util/copyrights") || die "can't open copyrights: $!";
+open(COPYRIGHTS, "<util/copyrights") || die "can't open ./util/copyrights: $!";
 while (<COPYRIGHTS>) {
     chomp;
     ($file, $type, $years) = split;
@@ -30,15 +30,39 @@ close(COPYRIGHTS);
 ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time());
 $year += 1900;
 
-open(FILES, "<util/files") || die "can't open files: $!";
+$find = "find . -type f -print";
+
+open(FILES, "$find | sort |") || die "can't start \"$find\": $!";
 while (<FILES>) {
     chomp;
+
+    next if (m%/\.\# |         # CVS old conflict file
+               /CVS/ |         # CVS directory
+               \.bak$ |                # created by update_copyrights
+               /(dnssafe|openssl)/.*\.[ch]$ |  # imported
+               doc/(draft|expired|rfc)/                # imported
+             %x);
+
     if (!$file_types{$_}) {
-       if ($_ =~ /\.[chy]$/) {
+       if ($_ =~ /\.(c|h|css)$/) {
            $file_types{$_} = "C";
+        } elsif ($_ =~ /\.y$/) {
+           $file_types{$_} = "YACC";
+        } elsif ($_ =~ /\.pl$/i) {
+           $file_types{$_} = "PERL";
+        } elsif ($_ =~ /\.sh$/) {
+           $file_types{$_} = "SH";
+        } elsif ($_ =~ /\.html$/) {
+           $file_types{$_} = "HTML";
+        } elsif ($_ =~ /\.man$/) {
+           $file_types{$_} = "MAN";
        } elsif ($_ =~ /\/Makefile\.in$/) {
            $file_types{$_} = "MAKE";
-       } elsif ($_ =~ /\/\.cvsignore$/) {
+       } elsif ($_ =~ /\/named.?\.conf$/) {
+           $file_types{$_} = "CONF-C";
+       } elsif ($_ =~ /\.(db|hint)(\.in)?$/) {
+           $file_types{$_} = "ZONE";
+       } elsif ($_ =~ /(\/\.cvsignore|\.gif|\.jpg)$/i) {
            $file_types{$_} = "X";
        } else {
            $file_types{$_} = "?";