diff options
author | Paul Smith <psmith@gnu.org> | 2019-08-24 14:41:10 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2019-08-24 14:41:10 -0400 |
commit | 40847ce9b8dbbfa9fcdcf77c9ed14704adfb53a9 (patch) | |
tree | 34bbcd4e1411278fc685c5452f195826ae450ece /scripts | |
parent | a01c5bee028e5892d4c60c7fd4f4f5b734b14839 (diff) | |
download | make-git-40847ce9b8dbbfa9fcdcf77c9ed14704adfb53a9.tar.gz |
* scripts/copyright-update: Use git ls-files for controlled files
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/copyright-update | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/copyright-update b/scripts/copyright-update index 2e7c598b..6740bf0f 100755 --- a/scripts/copyright-update +++ b/scripts/copyright-update @@ -5,20 +5,24 @@ # # Update GNU make copyrights using gnulib update-copyright +EXCLUDE='^\(\.[a-z].*\|.*/\.[a-z].*\|.*COPYING\|src/hash\.[ch]\|ChangeLog.*\|.*/ChangeLog.*\|INSTALL\|doc/make\.texi\|bootstrap\)$' + update=${UPDATE_COPYRIGHT:-${GNULIB_SRCDIR:-../../gnulib}/build-aux/update-copyright} die () { echo "$*"; exit 1; } +getfiles () { + git ls-files | grep -v "$EXCLUDE" +} + run () { cmd=$(command -v "$update") || die "Cannot locate update-copyright ($update)" [ -x "$cmd" ] || die "Cannot locate update-copyright ($update)" - EXCLUDE='^\(.*/\.[a-z].*\|.*COPYING\|glob/.*\|src/hash\.[ch]\|ChangeLog\.[0-9]*\|.*/ChangeLog\.[0-9]*\|INSTALL\|doc/make\.texi\)$' - force=false case $1 in - (-v) find * -type f | grep -v "$EXCLUDE" | sort; exit 0 ;; + (-v) getfiles | sort; exit 0 ;; (-f) force=true ;; (--) : ;; (-*) echo "usage: $0 [-v]"; exit 1 ;; @@ -35,7 +39,7 @@ run () { # We use intervals export UPDATE_COPYRIGHT_USE_INTERVALS=1 - "$cmd" $(find * -type f | grep -v "$EXCLUDE") + "$cmd" $(getfiles) echo "*** Update doc/make.texi copyright by hand!" echo "*** Update src/main.c:print_version() copyright by hand!" |