bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copyright years: mass-update every January 1


From: Jim Meyering
Subject: Re: copyright years: mass-update every January 1
Date: Wed, 29 Jul 2009 10:57:26 +0200

Jim Meyering wrote:

> Joel E. Denny wrote:
>
>> Hi Jim.
>>
>> On Fri, 26 Jun 2009, Jim Meyering wrote:
>>
>>> >From 85dd41402048603c977f49c5d1ea349b1c724531 Mon Sep 17 00:00:00 2001
>>> From: Jim Meyering <address@hidden>
>>> Date: Fri, 26 Jun 2009 13:33:59 +0200
>>> Subject: [PATCH] maint: add a rule to automate the annual 
>>> copyright-year-update process
>>>
>>> * build-aux/update-copyright: New file.
>>> * Makefile.am (changelog_etc): Add update-copyright.
>>> (update-copyright): New rule.
>
> Hi Joel,
>
>> I'd like to use this in Bison.  Would you consider contributing
>> build-aux/update-copyright to gnulib so we don't maintain separate copies?
>
> Sure.
> First, here's a change to catch the extra cases you noted,
> but without concatenating lines.

Whoops.
I didn't test well enough.
That worked only for a single file, so I've just pushed this
additional change:

>From c91c85647c4dc98ea43b2b368f9be2ecf1855eba Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 29 Jul 2009 10:56:10 +0200
Subject: [PATCH] maint: update-copyright: fix just-introduced bug

* build-aux/update-copyright: ... and revert-for-now the
change that made this script invoke localtime only once.
---
 build-aux/update-copyright |   10 +++-------
 1 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/build-aux/update-copyright b/build-aux/update-copyright
index 9039b7c..23d8f38 100755
--- a/build-aux/update-copyright
+++ b/build-aux/update-copyright
@@ -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);
--
1.6.4.rc3.201.gd9d59




reply via email to

[Prev in Thread] Current Thread [Next in Thread]