summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2019-08-24 14:41:10 -0400
committerPaul Smith <psmith@gnu.org>2019-08-24 14:41:10 -0400
commit40847ce9b8dbbfa9fcdcf77c9ed14704adfb53a9 (patch)
tree34bbcd4e1411278fc685c5452f195826ae450ece /scripts
parenta01c5bee028e5892d4c60c7fd4f4f5b734b14839 (diff)
downloadmake-git-40847ce9b8dbbfa9fcdcf77c9ed14704adfb53a9.tar.gz
* scripts/copyright-update: Use git ls-files for controlled files
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/copyright-update12
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!"