Skip to content

Commit

Permalink
Copyright-updating script now retains non-NYU/UIowa copyrights in fil…
Browse files Browse the repository at this point in the history
…es if present.
  • Loading branch information
mdeters committed Oct 6, 2014
1 parent ff78886 commit 63437ae
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions contrib/update-copyright.pl
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@
** 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;
Expand Down Expand Up @@ -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";
Expand Down

0 comments on commit 63437ae

Please sign in to comment.