2016-01-12 23:32:50 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# This file is part of the coreboot project.
|
|
|
|
#
|
|
|
|
# Copyright (C) 2010 coresystems GmbH
|
|
|
|
# Copyright (C) 2016 Google Inc.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; version 2 of the License.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# DESCR: verify that files don't have the old style header
|
|
|
|
|
|
|
|
# regex list of files and directories to exclude from the search
|
|
|
|
HEADER_EXCLUDED="\
|
2015-09-29 16:41:19 +02:00
|
|
|
^src/lib/gnat/|\
|
2016-01-12 23:32:50 +01:00
|
|
|
^src/vendorcode/|\
|
|
|
|
^util/kconfig/|\
|
|
|
|
\<COPYING\>|\
|
|
|
|
\.jpg$|\
|
|
|
|
\.cksum$|\
|
|
|
|
\.bin$|\
|
|
|
|
\.hex$|\
|
|
|
|
\.patch$|\
|
|
|
|
_shipped$|\
|
|
|
|
^util/scripts/no-fsf-addresses.sh|\
|
|
|
|
^util/lint/lint-000-license-headers|\
|
2016-01-20 05:03:04 +01:00
|
|
|
^util/lint/lint-stable-009-old-licenses\
|
2016-01-12 23:32:50 +01:00
|
|
|
"
|
|
|
|
|
2016-01-20 05:03:04 +01:00
|
|
|
if [ -z "$HEADER_DIRS" ]; then
|
2016-01-12 23:32:50 +01:00
|
|
|
HEADER_DIRS="src util"
|
|
|
|
fi
|
|
|
|
|
|
|
|
LC_ALL=C export LC_ALL
|
|
|
|
|
|
|
|
headerlist=$(git ls-files $HEADER_DIRS | egrep -v "($HEADER_EXCLUDED)")
|
|
|
|
|
|
|
|
#check for the old style header
|
|
|
|
headerlist=$(grep -il "You should have received a copy of the GNU" \
|
2016-01-20 05:03:04 +01:00
|
|
|
$headerlist 2>/dev/null)
|
2016-01-12 23:32:50 +01:00
|
|
|
|
|
|
|
for file in $headerlist; do
|
|
|
|
echo "$file has the old GPL header."
|
|
|
|
done
|