2 # This file is part of the coreboot project.
4 # Copyright (C) 2010 coresystems GmbH
5 # Copyright (C) 2016 Google Inc.
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; version 2 of the License.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
17 # DESCR: verify that files don't have the old style header
19 # regex list of files and directories to exclude from the search
32 ^util/scripts/no-fsf-addresses.sh|\
33 ^util/lint/lint-000-license-headers|\
34 ^util/lint/lint-stable-009-old-licenses\
37 if [ -z "$HEADER_DIRS" ]; then
38 HEADER_DIRS
="src util"
41 LC_ALL
=C
export LC_ALL
43 headerlist
=$
(git ls-files
$HEADER_DIRS |
egrep -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."