summaryrefslogtreecommitdiff
path: root/contrib/update-copyright.pl
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@cs.nyu.edu>2014-10-06 18:45:26 -0400
committerMorgan Deters <mdeters@cs.nyu.edu>2014-10-06 18:51:24 -0400
commit63437aec44747fb9ad0ab6264ae5e4bbf3dc0e5b (patch)
treebf02a756a75ea81f905dda49648a0e9c3cd47ae8 /contrib/update-copyright.pl
parentff788863577dbc8d15a584d869f543773ce0ff1d (diff)
Copyright-updating script now retains non-NYU/UIowa copyrights in files if present.
Diffstat (limited to 'contrib/update-copyright.pl')
-rwxr-xr-xcontrib/update-copyright.pl25
1 files changed, 13 insertions, 12 deletions
diff --git a/contrib/update-copyright.pl b/contrib/update-copyright.pl
index f3c4248ac..2a581698c 100755
--- a/contrib/update-copyright.pl
+++ b/contrib/update-copyright.pl
@@ -48,13 +48,6 @@ my $standard_template = <<EOF;
** information.\\endverbatim
EOF
-my $public_template = <<EOF;
- ** This file is part of the CVC4 project.
- ** Copyright (c) $years New York University and The University of Iowa
- ** See the file COPYING in the top-level source directory for licensing
- ** information.\\endverbatim
-EOF
-
## end config ##
use strict;
@@ -164,17 +157,25 @@ sub handleFile {
print $OUT " ** Original author: $author\n";
print $OUT " ** Major contributors: $major_contributors\n";
print $OUT " ** Minor contributors (to current version): $minor_contributors\n";
- print $OUT $standard_template;
- print $OUT " **\n";
+ my $comment_stub = "";
while(my $line = <$IN>) {
+ if($line =~ /\b[Cc]opyright\b/ && $line !~ /\bNew York University and The University of Iowa\b/) {
+ # someone else holds this copyright
+ print $OUT $line;
+ }
last if $line =~ /^ \*\*\s*$/;
if($line =~ /\*\//) {
- print $OUT " ** [[ Add lengthier description here ]]\n";
- print $OUT " ** \\todo document this file\n";
- print $OUT $line;
+ $comment_stub = " ** [[ Add lengthier description here ]]\n\
+ ** \\todo document this file\n\
+$line";
last;
}
}
+ print $OUT $standard_template;
+ print $OUT " **\n";
+ if($comment_stub) {
+ print $OUT $comment_stub;
+ }
} else {
my $line = $_;
print "adding\n";
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback