]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
add RCS id strings to files that lack them
authorDavid Lawrence <source@isc.org>
Thu, 22 Jun 2000 21:46:35 +0000 (21:46 +0000)
committerDavid Lawrence <source@isc.org>
Thu, 22 Jun 2000 21:46:35 +0000 (21:46 +0000)
util/update_copyrights

index 947c1ffc7f3ec0d07a2a40a2b746b79cc4c20211..61343abd705c9669d20e7a1b6b1946efd23b9faf 100644 (file)
@@ -254,13 +254,31 @@ while (<>) {
        $first = <SOURCE>;
     }
     if (defined($first)) {
-       if ($first !~ /^\s*$/) {
-           print TARGET "\n";
-       }
-       print TARGET $first;
-       while (<SOURCE>) {
-           print TARGET $_;
-       }
+        print TARGET "\n";
+
+        undef $/;
+        $_ = <SOURCE>;
+        $/ = "\n";
+
+        my $pat = '\$(Id|Revision):.*\$';
+        my ($start, $end);
+        if ($start_comment ne "") {
+            ($start = $start_comment) =~ s/\s*\n/ /;
+            ($end = $end_comment) =~ s/^\s*(.*)\n/ $1\n/;
+        } elsif ($prefix ne "") {
+            ($start = $prefix) =~ s/\s*\n//;
+            $end = "\n";
+        } else {
+            $start = "";
+            $end = "\n";
+        }
+
+        if ($first !~ /$pat/ && $_ !~ /$pat/) {
+            print TARGET "$start\$Id: update_copyrights,v 1.13 2000/06/22 21:46:35 tale Exp $$end\n";
+        }
+
+        print TARGET $first if $first !~ /^\s*$/;
+        print TARGET $_;
     }
     close(TARGET);
     close(SOURCE);