util/: Replace GPLv2 boiler plate with SPDX header
[coreboot.git] / util / lint / lint-stable-009-old-licenses
blob1835a35e14a98ac5c7989166a91c7c0e3f5bb0bc
1 #!/bin/sh
2 # This file is part of the coreboot project.
4 # SPDX-License-Identifier: GPL-2.0-only
6 # DESCR: verify that files don't have the old style header
8 # regex list of files and directories to exclude from the search
9 HEADER_EXCLUDED="\
10 ^src/lib/gnat/|\
11 ^src/vendorcode/|\
12 ^util/kconfig/|\
13 \<COPYING\>|\
14 \.jpg$|\
15 \.cksum$|\
16 \.bin$|\
17 \.vbt$|\
18 \.hex$|\
19 \.patch$|\
20 _shipped$|\
21 ^util/scripts/no-fsf-addresses.sh|\
22 ^util/lint/lint-000-license-headers|\
23 ^util/lint/lint-stable-009-old-licenses\
26 if [ -z "$HEADER_DIRS" ]; then
27 HEADER_DIRS="src util"
30 LC_ALL=C export LC_ALL
32 headerlist=$(git ls-files $HEADER_DIRS | egrep -v "($HEADER_EXCLUDED)")
34 #check for the old style header
35 headerlist=$(grep -il "You should have received a copy of the GNU" \
36 $headerlist 2>/dev/null)
38 for file in $headerlist; do
39 echo "$file has the old GPL header."
40 done