Simon Josefsson wrote: > How about this patch? Not all projects are copyright'ed by the FSF. > The patch makes it possible to override the otherwise hard-coded string, > thought cfg.mk and without modifying the update-copyright script iself.
I like it. One suggestion before you push it: > diff --git a/ChangeLog b/ChangeLog > index 1ba0366..17115d4 100644 > --- a/ChangeLog > +++ b/ChangeLog > @@ -1,3 +1,8 @@ > +2011-01-02 Simon Josefsson <[email protected]> > + > + * build-aux/update-copyright: Support UPDATE_COPYRIGHT_HOLDER > + environment variable. > + > 2011-01-01 Ben Pfaff <[email protected]> > > Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break() > diff --git a/build-aux/update-copyright b/build-aux/update-copyright > index 51546cc..cd89c3e 100755 > --- a/build-aux/update-copyright > +++ b/build-aux/update-copyright > @@ -3,7 +3,7 @@ eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" > ${1+"$@"}' > if 0; > # Update an FSF copyright year list to include the current year. > > -my $VERSION = '2009-12-28.11:09'; # UTC > +my $VERSION = '2011-01-02.09:54'; # UTC > > # Copyright (C) 2009-2011 Free Software Foundation, Inc. > # > @@ -122,7 +122,9 @@ use warnings; > > my $copyright_re = 'Copyright'; > my $circle_c_re = '(?:\([cC]\)|@copyright{}|©)'; > -my $holder = 'Free Software Foundation, Inc.'; > +my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; > +!$holder > + and $holder = 'Free Software Foundation, Inc.'; In this case, I prefer to use this idiom; less duplication: $holder ||= 'Free Software Foundation, Inc.'; In other cases, you might want to check for definedness, when "0" (or any other string evaluating to false) would otherwise be valid. In those cases, I prefer this: defined $holder or $holder = '...'; > my $prefix_max = 5; > my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; > !$margin || $margin !~ m/^\d+$/ > @@ -252,7 +254,7 @@ if (defined $stmt_re) > } > else > { > - print STDERR "$ARGV: warning: FSF copyright statement not found\n"; > + print STDERR "$ARGV: warning: copyright statement not found\n"; > } > > # Local variables:
