Mercurial > gnulib
comparison build-aux/update-copyright @ 39210:9b55cbc9c002
update-copyright: Handle use of ©
* build-aux/update-copyright ($circle_c_re): Update regex to
handle use of © in headers.
author | Mathieu Lirzin <mthl@gnu.org> |
---|---|
date | Thu, 04 Jan 2018 15:59:04 +0100 |
parents | 24e347e0e326 |
children | 33ee5e90be64 |
comparison
equal
deleted
inserted
replaced
39209:d55b9d6af1df | 39210:9b55cbc9c002 |
---|---|
1 eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' | 1 eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" "$@"' |
2 & eval 'exec perl -wS -0777 -pi "$0" $argv:q' | 2 & eval 'exec perl -wS -0777 -pi "$0" $argv:q' |
3 if 0; | 3 if 0; |
4 # Update an FSF copyright year list to include the current year. | 4 # Update an FSF copyright year list to include the current year. |
5 | 5 |
6 my $VERSION = '2017-09-13.06:45'; # UTC | 6 my $VERSION = '2018-01-04.14:48'; # UTC |
7 | 7 |
8 # Copyright (C) 2009-2018 Free Software Foundation, Inc. | 8 # Copyright (C) 2009-2018 Free Software Foundation, Inc. |
9 # | 9 # |
10 # This program is free software: you can redistribute it and/or modify | 10 # This program is free software: you can redistribute it and/or modify |
11 # it under the terms of the GNU General Public License as published by | 11 # it under the terms of the GNU General Public License as published by |
79 # | 79 # |
80 # A. (C) | 80 # A. (C) |
81 # B. (c) | 81 # B. (c) |
82 # C. @copyright{} | 82 # C. @copyright{} |
83 # D. © | 83 # D. © |
84 # E. © | |
84 # | 85 # |
85 # 4. The "Copyright" appears at the beginning of a line, except that it | 86 # 4. The "Copyright" appears at the beginning of a line, except that it |
86 # may be prefixed by any sequence (e.g., a comment) of no more than | 87 # may be prefixed by any sequence (e.g., a comment) of no more than |
87 # 5 characters -- including white space. | 88 # 5 characters -- including white space. |
88 # 5. Iff such a prefix is present, the same prefix appears at the | 89 # 5. Iff such a prefix is present, the same prefix appears at the |
122 | 123 |
123 use strict; | 124 use strict; |
124 use warnings; | 125 use warnings; |
125 | 126 |
126 my $copyright_re = 'Copyright'; | 127 my $copyright_re = 'Copyright'; |
127 my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©)'; | 128 my $circle_c_re = '(?:\([cC]\)|@copyright\{}|\\\\\(co|©|©)'; |
128 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; | 129 my $holder = $ENV{UPDATE_COPYRIGHT_HOLDER}; |
129 $holder ||= 'Free Software Foundation, Inc.'; | 130 $holder ||= 'Free Software Foundation, Inc.'; |
130 my $prefix_max = 5; | 131 my $prefix_max = 5; |
131 my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; | 132 my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH}; |
132 !$margin || $margin !~ m/^\d+$/ | 133 !$margin || $margin !~ m/^\d+$/ |