diff options
author | Neil Puttock <n.puttock@gmail.com> | 2010-01-23 21:11:51 +0000 |
---|---|---|
committer | Neil Puttock <n.puttock@gmail.com> | 2010-01-23 21:11:51 +0000 |
commit | f160abeda31af3d444ec606fb7305852547bb62b (patch) | |
tree | 57598ea59c81a03214f2b9fe71c82e44db6464c6 | |
parent | 75a79590cb2dc81c3f20c3643f7636900a771d66 (diff) |
grand-replace.py: Update.
* add txi-it.tex to copied_files
* use lookahead to prevent space after current year being swallowed in
files with single copyright year
-rw-r--r-- | scripts/build/grand-replace.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/build/grand-replace.py b/scripts/build/grand-replace.py index cfbe88f3db..85be5b7740 100644 --- a/scripts/build/grand-replace.py +++ b/scripts/build/grand-replace.py @@ -46,6 +46,7 @@ copied_files = [ 'txi-en.tex', 'txi-fr.tex', 'txi-es.tex', + 'txi-it.tex', ] def main (): @@ -57,7 +58,7 @@ def main (): last_year = year - 1 last_year_1d = last_year % 10 for f in files: - pytt.pytt ('(Copyright|\(c\)|\(C\)|@copyright\{\})\s*%(last_year)s([^-]|$)' % locals (), + pytt.pytt ('(Copyright|\(c\)|\(C\)|@copyright\{\})\s*%(last_year)s(?=[^-]|$)' % locals (), r'\1 %(last_year)s--%(year)s' % locals (), f) pytt.pytt ('(Copyright|\(c\)|\(C\)|@copyright\{\})\s*([^-]*)--(20[0-9][0-%(last_year_1d)s])' % locals (), |