Paul Eggert committed Dec 24, 2013 1 2 3 4 5 6 7 8 9 #! /bin/sh # Update the copyright dates in Emacs sources. # Typical usage: # # admin/update-copyright # # By default, this script uses the local-time calendar year. # Set the UPDATE_COPYRIGHT_YEAR environment variable to override the default.  Paul Eggert committed Jan 01, 2019 10 # Copyright 2013-2019 Free Software Foundation, Inc.  Paul Eggert committed Dec 24, 2013 11 12 13 14 15 16 17 18 19 20 21 22 23 24  # This file is part of GNU Emacs. # GNU Emacs is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # GNU Emacs is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License  Paul Eggert committed Sep 13, 2017 25 # along with GNU Emacs. If not, see .  Paul Eggert committed Dec 24, 2013 26 27 28 29 30 31 32 33 34 35 36 37 38 39  # written by Paul Eggert # FIXME: The file 'notes/copyright' says that the AIST copyright years # should be updated, but by inspection it appears that some should be # updated and some should not be, due to registration numbers, so # this script leaves these copyright years alone for now. : ${UPDATE_COPYRIGHT_USE_INTERVALS=1} export UPDATE_COPYRIGHT_USE_INTERVALS :${UPDATE_COPYRIGHT_YEAR=$(date +%Y)} export UPDATE_COPYRIGHT_YEAR  Paul Eggert committed Jan 01, 2015 40 emacsver=etc/refcards/emacsver.tex.in  Paul Eggert committed Dec 24, 2013 41 42 43 44 45 46 47 sed 's/\\def\\year[{][0-9]*[}]/\\def\\year{'"$UPDATE_COPYRIGHT_YEAR"'}'/g \ $emacsver >$emacsver.aux && { cmp -s $emacsver$emacsver.aux || cp $emacsver.aux$emacsver } && rm $emacsver.aux &&  Eric S. Raymond committed Nov 11, 2014 48 repo_files=$(git ls-files) &&  Paul Eggert committed Dec 24, 2013 49 50 51 52 53 54  # Do not update the copyright of files that have one or more of the # following problems: # . They are license files, maintained by the FSF, with their own dates. # . Their format cannot withstand changing the contents of copyright strings.  Eric S. Raymond committed Oct 25, 2014 55 updatable_files=$(find$repo_files \  Paul Eggert committed Dec 24, 2013 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75  ! -name COPYING \ ! -name doclicense.texi \ ! -name gpl.texi \ ! -name '*-gzipped' \ ! -name '*.ico' \ ! -name '*.icns' \ ! -name '*.pbm' \ ! -name '*.pdf' \ ! -name '*.png' \ ! -name '*.sig' \ ! -name '*.tar' \ ! -name '*.tiff' \ ! -name '*.xpm' \ ! -name eterm-color \ ! -name hand.cur \ ! -name key.pub \ ! -name key.sec \ -print) && build-aux/update-copyright \$updatable_files