]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: update-copyright: fix just-introduced bug
authorJim Meyering <meyering@redhat.com>
Wed, 29 Jul 2009 08:56:10 +0000 (10:56 +0200)
committerJim Meyering <meyering@redhat.com>
Wed, 29 Jul 2009 08:56:10 +0000 (10:56 +0200)
* build-aux/update-copyright: ... and revert-for-now the
change that made this script invoke localtime only once.

build-aux/update-copyright

index 9039b7cca18c886c45c3fc9fe1e7b3b403c862a7..23d8f38cab5107200ce954adeaab5f3197561123 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -0777 -pi
 # Update an FSF copyright year list to include the current year.
 
-my $VERSION = '2009-07-29.08:18'; # UTC
+my $VERSION = '2009-07-29.08:43'; # UTC
 
 # Copyright (C) 2009 Free Software Foundation
 #
@@ -23,14 +23,10 @@ my $VERSION = '2009-07-29.08:18'; # UTC
 use strict;
 use warnings;
 
-my $this_year;
+my ($sec, $min, $hour, $mday, $month, $year) = localtime (time());
+my $this_year = $year + 1900;
 my $holder = 'Free Software Foundation';
 
-BEGIN {
-  my ($sec, $min, $hour, $mday, $month, $year) = localtime (time());
-  $this_year = $year + 1900;
-}
-
 if (/([- ])((?:\d\d)?\d\d)(\s+$holder)/s)
   {
     my ($sep, $last_c_year, $rest) = ($1, $2, $3);