diff options
author | Christopher Faylor <me@cgf.cx> | 2013-01-21 04:30:27 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-01-21 04:30:27 +0000 |
commit | d89e61f354d50020fd4cb1fbfb37bf0864ad5ec1 (patch) | |
tree | d65734a83f51f9232392d06768bd57b5a1cc544d | |
parent | eb0876b22f1ea035959416cb1780236df011222a (diff) | |
download | newlib-d89e61f354d50020fd4cb1fbfb37bf0864ad5ec1.zip newlib-d89e61f354d50020fd4cb1fbfb37bf0864ad5ec1.tar.gz newlib-d89e61f354d50020fd4cb1fbfb37bf0864ad5ec1.tar.bz2 |
* update-copyright (update_maybe): Accommodate perl-style copyright comments.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rwxr-xr-x | winsup/cygwin/update-copyright | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5ababd9..ba93029 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx> + * update-copyright (update_maybe): Accommodate perl-style copyright + comments. + +2013-01-20 Christopher Faylor <me.cygwin2013@cgf.cx> + * update-copyright: Silently skip nonexistent files. Display filename on update. Don't update non-Red Hat copyrights. diff --git a/winsup/cygwin/update-copyright b/winsup/cygwin/update-copyright index 47ab14f..112592e 100755 --- a/winsup/cygwin/update-copyright +++ b/winsup/cygwin/update-copyright @@ -54,7 +54,7 @@ sub update_maybe($%) { while (<>) { if ($copyright) { push @file, $_; - } elsif (/^\s*Copyright/o) { + } elsif (/^[#\s]*Copyright/o) { $copyright = $_; $copyright .= scalar <> while $copyright =~ /,\s*$/o; if ($copyright !~ /Red Hat, Inc\.\n/o) { @@ -64,7 +64,7 @@ sub update_maybe($%) { for my $date ($copyright =~ /(\d+)/g) { $dates{$date} = 1; } - my $indent = ($copyright =~ /\A(\s*)/o)[0]; + my $indent = ($copyright =~ /\A([#\s]*)/o)[0]; my $newcopyright = addwrap $indent, $indent . 'Copyright ' . (join ', ', sort {$a <=> $b} sort keys %dates) . |