* update-copyright (update_maybe): Accommodate perl-style copyright comments.
This commit is contained in:
parent
eb0876b22f
commit
d89e61f354
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -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) .
|
||||
|
|
Loading…
Reference in New Issue