aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/license_headers
blob: a381d028bd1076eef166a95de38cde842a4cac58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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"