projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
strtoumax: fix typo in previous commit.
[gnulib.git]
/
build-aux
/
update-copyright
diff --git
a/build-aux/update-copyright
b/build-aux/update-copyright
index
d86a12b
..
c72d0e6
100755
(executable)
--- a/
build-aux/update-copyright
+++ b/
build-aux/update-copyright
@@
-3,9
+3,9
@@
eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
if 0;
# Update an FSF copyright year list to include the current year.
if 0;
# Update an FSF copyright year list to include the current year.
-my $VERSION = '201
1-01-02.20:59
'; # UTC
+my $VERSION = '201
3-01-03.09:41
'; # UTC
-# Copyright (C) 2009-201
2
Free Software Foundation, Inc.
+# Copyright (C) 2009-201
3
Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-24,7
+24,7
@@
my $VERSION = '2011-01-02.20:59'; # UTC
# The arguments to this script should be names of files that contain
# copyright statements to be updated. The copyright holder's name
# The arguments to this script should be names of files that contain
# copyright statements to be updated. The copyright holder's name
-# defaults to "Free Softwar
d
Foundation, Inc." but may be changed to
+# defaults to "Free Softwar
e
Foundation, Inc." but may be changed to
# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
# variable.
#
# any other name by using the "UPDATE_COPYRIGHT_HOLDER" environment
# variable.
#
@@
-43,7
+43,7
@@
my $VERSION = '2011-01-02.20:59'; # UTC
# A warning is printed for every file for which no copyright
# statement is recognized.
#
# A warning is printed for every file for which no copyright
# statement is recognized.
#
-# Each file's copyright statement must be formated correctly in
+# Each file's copyright statement must be format
t
ed correctly in
# order to be recognized. For example, each of these is fine:
#
# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
# order to be recognized. For example, each of these is fine:
#
# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
@@
-110,6
+110,9
@@
my $VERSION = '2011-01-02.20:59'; # UTC
# interval (such as 1990-2008). If unset or set to 0, all existing
# copyright year intervals in a reformatted FSF copyright statement
# are expanded instead.
# interval (such as 1990-2008). If unset or set to 0, all existing
# copyright year intervals in a reformatted FSF copyright statement
# are expanded instead.
+# If UPDATE_COPYRIGHT_USE_INTERVALS=2, convert a sequence with gaps
+# to the minimal containing range. For example, convert
+# 2000, 2004-2007, 2009 to 2000-2009.
# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
# 4. The default maximum line length for a copyright line is 72.
# 3. For testing purposes, you can set the assumed current year in
# UPDATE_COPYRIGHT_YEAR.
# 4. The default maximum line length for a copyright line is 72.
@@
-189,7
+192,7
@@
if (defined $stmt_re)
if ($final_year != $this_year)
{
# Update the year.
if ($final_year != $this_year)
{
# Update the year.
- $stmt =~ s/
$final_year_orig
/$final_year, $this_year/;
+ $stmt =~ s/
\b$final_year_orig\b
/$final_year, $this_year/;
}
if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
{
}
if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
{
@@
-221,6
+224,10
@@
if (defined $stmt_re)
}))
)+
/$1-$3/gx;
}))
)+
/$1-$3/gx;
+
+ # When it's 2, emit a single range encompassing all year numbers.
+ $ENV{UPDATE_COPYRIGHT_USE_INTERVALS} == 2
+ and $stmt =~ s/\b(\d{4})\b.*\b(\d{4})\b/$1-$2/;
}
# Format within margin.
}
# Format within margin.