From bfc2b8d8396a08b7fbd1615ddabe721102323b76 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 9 Sep 2020 18:18:43 +0100 Subject: License header checking script --- scripts/license_headers | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 scripts/license_headers (limited to 'scripts/license_headers') diff --git a/scripts/license_headers b/scripts/license_headers new file mode 100755 index 0000000..a381d02 --- /dev/null +++ b/scripts/license_headers @@ -0,0 +1,14 @@ +#!/bin/bash + +mapfile -t ignore <.licignore + +ret=0 + +while read -r -d ''; do + if ! grep -q SPDX-License-Identifier "$REPLY"; then + ret=1 + echo "'$REPLY' has no SPDX-License-Identifier" + fi +done < <(git ls-files -z "${ignore[@]/#/:!:}") + +exit "$ret" -- cgit v1.2.3-54-g00ecf