util/lint: Fix linter for old license headers

Somehow I lost a $ on headerlist between when I tested the script
and when I submitted it, turning headerlist into plain text instead
of a variable name.  This makes the test always pass.
- Fix variable bug.
- exclude this script from the check.
- update test for empty HEADER_DIRS variable.

Change-Id: I6080c520bc741e9d689f7c66ee97879afc8ba38c
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13057
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Martin Roth 2016-01-19 21:03:04 -07:00 committed by Patrick Georgi
parent 6720394ffc
commit 6966759edb
1 changed files with 3 additions and 3 deletions

View File

@ -29,10 +29,10 @@ HEADER_EXCLUDED="\
_shipped$|\
^util/scripts/no-fsf-addresses.sh|\
^util/lint/lint-000-license-headers|\
^util/lint/lint-stable-000-license-headers\
^util/lint/lint-stable-009-old-licenses\
"
if [ "$HEADER_DIRS" = "" ]; then
if [ -z "$HEADER_DIRS" ]; then
HEADER_DIRS="src util"
fi
@ -42,7 +42,7 @@ 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" \
headerlist 2>/dev/null)
$headerlist 2>/dev/null)
for file in $headerlist; do
echo "$file has the old GPL header."