lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 1 | #! /bin/sh |
| 2 | # Update copyright year lists. |
| 3 | # Copyright (C) 2012-2015 Free Software Foundation, Inc. |
| 4 | # This file is part of the GNU C Library. |
| 5 | |
| 6 | # The GNU C Library is free software; you can redistribute it and/or |
| 7 | # modify it under the terms of the GNU Lesser General Public |
| 8 | # License as published by the Free Software Foundation; either |
| 9 | # version 2.1 of the License, or (at your option) any later version. |
| 10 | |
| 11 | # The GNU C Library is distributed in the hope that it will be useful, |
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | # Lesser General Public License for more details. |
| 15 | |
| 16 | # You should have received a copy of the GNU Lesser General Public |
| 17 | # License along with the GNU C Library; if not, see |
| 18 | # <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | # Run this script with the first argument being the location of |
| 21 | # gnulib's update-copyright script. Any other arguments are ignored. |
| 22 | # FSF copyright notices in the glibc source directory containing this |
| 23 | # script will be updated; glibc must then be built to update generated |
| 24 | # files. Copyright dates in --version copyright notices are not |
| 25 | # updated. |
| 26 | |
| 27 | set -e |
| 28 | |
| 29 | export LC_ALL=C |
| 30 | export UPDATE_COPYRIGHT_FORCE=1 |
| 31 | export UPDATE_COPYRIGHT_USE_INTERVALS=2 |
| 32 | export UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 |
| 33 | |
| 34 | update_script=$1 |
| 35 | |
| 36 | if ! [ -f "$update_script" ]; then |
| 37 | echo "error: first argument must point to gnulib update-copyright script" >&2 |
| 38 | exit 1 |
| 39 | fi |
| 40 | |
| 41 | cd "$(dirname "$0")/.." |
| 42 | |
| 43 | files=$(find . -type f | sed 's|^\./||' | grep -v '^\.git/') |
| 44 | |
| 45 | for f in $files; do |
| 46 | case $f in |
| 47 | COPYING | COPYING.LIB | manual/fdl-1.3.texi | manual/lgpl-2.1.texi) |
| 48 | # Licenses imported verbatim from FSF sources. |
| 49 | ;; |
| 50 | manual/texinfo.tex | scripts/config.guess | scripts/config.sub \ |
| 51 | | scripts/install-sh | scripts/mkinstalldirs | scripts/move-if-change) |
| 52 | # Other files imported verbatim from other GNU repositories. |
| 53 | ;; |
| 54 | po/*.po) |
| 55 | # Files imported verbatim from the Translation Project. |
| 56 | ;; |
| 57 | INSTALL | intl/plural.c | locale/C-translit.h \ |
| 58 | | locale/programs/charmap-kw.h | locale/programs/locfile-kw.h \ |
| 59 | | po/libc.pot | sysdeps/gnu/errlist.c) |
| 60 | # Generated files. |
| 61 | ;; |
| 62 | configure | */configure | preconfigure | */preconfigure) |
| 63 | # Possibly generated files. |
| 64 | if ! [ -f "$f.ac" ]; then |
| 65 | "$update_script" "$f" |
| 66 | fi |
| 67 | ;; |
| 68 | grp/initgroups.c | misc/bits/stab.def | posix/regex.h \ |
| 69 | | sysdeps/wordsize-32/divdi3.c) |
| 70 | # Pre-1991 gaps in copyright years, so cannot use a single range. |
| 71 | UPDATE_COPYRIGHT_USE_INTERVALS=1 "$update_script" "$f" |
| 72 | ;; |
| 73 | *) |
| 74 | "$update_script" "$f" |
| 75 | ;; |
| 76 | esac |
| 77 | done |