soc/intel/xeon_sp: Align resources to 4K
[coreboot2.git] / util / lint / lint-stable-009-old-licenses
blob45c01c73a6e3523c15443caf5ca9c832db6da2cf
1 #!/usr/bin/env sh
3 # SPDX-License-Identifier: GPL-2.0-only
5 # DESCR: Verify that files don't have the old style header
7 # regex list of files and directories to exclude from the search
9 LINTDIR="$(
10 cd -- "$(dirname "$0")" > /dev/null 2>&1 || return
11 pwd -P
14 # shellcheck source=helper_functions.sh
15 . "${LINTDIR}/helper_functions.sh"
17 HEADER_EXCLUDED="\
18 ^src/lib/gnat/|\
19 ^src/vendorcode/|\
20 ^util/kconfig/|\
21 \<COPYING\>|\
22 \.jpg$|\
23 \.cksum$|\
24 \.bin$|\
25 \.vbt$|\
26 \.apcb$|\
27 \.hex$|\
28 \.patch$|\
29 _shipped$|\
30 ^util/scripts/no-fsf-addresses.sh|\
31 ^util/lint/lint-000-license-headers|\
32 ^util/lint/lint-stable-009-old-licenses|\
33 ^util/nvidia/cbootimage|\
34 ^3rdparty|\
35 __pycache__|\
36 ^payloads/external\
39 if [ -z "$HEADER_DIRS" ]; then
40 HEADER_DIRS="src util tests"
43 headerlist=$(${FIND_FILES} $HEADER_DIRS | grep -E -v "($HEADER_EXCLUDED)")
45 #check for the old style header
46 headerlist=$(grep -il "You should have received a copy of the GNU" \
47 $headerlist 2>/dev/null)
49 for file in $headerlist; do
50 echo "$file has the old GPL header."
51 done