+2010-05-17: Christian Ruppert <idl0r@gentoo.org>
+ * echangelog: Update copyright in other files too (except binaries and
+ diff/patches), bug 285520.
+
2010-04-18: Christian Ruppert <idl0r@gentoo.org>
src/echangelog/echangelog: Fix bazaar MOVED/MODIFIED, thanks to Serkan
Kaba <serkan@gentoo.org>, bug 315931.
}
}
+sub update_copyright {
+ my ($t) = @_;
+ (my $year = $date) =~ s/.* //;
+
+ $t =~ s/^# Copyright \d+(?= )/$&-$year/m or
+ $t =~ s/^(# Copyright) \d+-(\d+)/$1 1999-$year/m;
+
+ return $t;
+}
+
GetOptions(
'help' => \$opt_help,
'no-strict' => \$opt_nostrict,
$text = update_cat_pn($text);
}
-sub update_copyright {
- my ($t) = @_;
- (my $year = $date) =~ s/.* //;
-
- $t =~ s/^# Copyright \d+(?= )/$&-$year/m or
- $t =~ s/^(# Copyright) \d+-(\d+)/$1 1999-$year/m;
-
- return $t;
-}
-
# Update the copyright year in the ChangeLog
$text = update_copyright($text);
print O $text or die "Can't write ChangeLog.new: $!\n";
close O or die "Can't close ChangeLog.new: $!\n";
-# Update affected ebuild copyright dates. There is no reason to update the
-# copyright lines on ebuilds that haven't changed. I verified this with an IP
-# lawyer.
-for my $e (grep /\.ebuild$/, @files) {
- if (-s $e) {
+
+# Update affected ebuilds and some other files copyright dates. There is no reason to update the
+# copyright lines on ebuilds that haven't changed. I verified this with an IP
+# lawyer. (patches/diffs and binary files are excluded)
+for my $e (grep(!/\.(patch|diff)$/, @files)) {
+ if (-s $e && ! -B $e) {
my ($etext, $netext);
open E, "<$e" or warn("Can't read $e to update copyright year\n"), next;