From 2e3f570371f9f222ddb09c2811b9110b18e1167c Mon Sep 17 00:00:00 2001
From: Florian Fischer <florian.fischer@muhq.space>
Date: Sat, 1 May 2021 17:35:31 +0200
Subject: [PATCH] [check-license] exclude subprojects and use year and git
 user.name for autofixing

---
 tools/check-license | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/check-license b/tools/check-license
index f77900e2..d6e3ad12 100755
--- a/tools/check-license
+++ b/tools/check-license
@@ -77,7 +77,7 @@ MAX_PROCS=$(nproc)
 cd "${ROOTDIR}"
 
 set +e
-find . \( -path '*/\.*' -o -path "./build*" -o -path "./test/3rd-party*" \) -prune -o \
+find . \( -path '*/\.*' -o -path './subprojects*' -o -path "./build*" -o -path "./test/3rd-party*" \) -prune -o \
 	-type f -regextype posix-extended -regex '.*\.(c|h|cpp|hpp)' -print0 |\
 	xargs --null --max-args=1 --max-procs="${MAX_PROCS}" -I {} \
 		  bash -c 'check_license "$@"' _ "{}"
@@ -98,7 +98,7 @@ if [[ $CHECK_RETURN_VALUE -ne 0 ]]; then
 
 			cat <<EOF > "${TMPFILE}"
 // SPDX-License-Identifier: LGPL-3.0-or-later
-// Copyright © 2020 Florian Schmaus
+// Copyright © $(date +%Y) $(git config user.name)
 EOF
 			cat "${INVALID_LICENSE_FILE}" >> "${TMPFILE}"
 			mv "${TMPFILE}" "${INVALID_LICENSE_FILE}"
-- 
GitLab