From 63437aec44747fb9ad0ab6264ae5e4bbf3dc0e5b Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Mon, 6 Oct 2014 18:45:26 -0400 Subject: [PATCH] Copyright-updating script now retains non-NYU/UIowa copyrights in files if present. --- contrib/update-copyright.pl | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/contrib/update-copyright.pl b/contrib/update-copyright.pl index f3c4248ac25..2a581698c5a 100755 --- a/contrib/update-copyright.pl +++ b/contrib/update-copyright.pl @@ -48,13 +48,6 @@ ** information.\\endverbatim EOF -my $public_template = <) { + 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";