From 6966759edb84f5158f3daad4098a18d11f699cf7 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Tue, 19 Jan 2016 21:03:04 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/13057 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi --- util/lint/lint-stable-009-old-licenses | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') diff --git a/util/lint/lint-stable-009-old-licenses b/util/lint/lint-stable-009-old-licenses index 702798f0cc..9d9eb9f43c 100755 --- a/util/lint/lint-stable-009-old-licenses +++ b/util/lint/lint-stable-009-old-licenses @@ -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." -- cgit v1.2.3