Skip to content

Commit

Permalink
[FAB-9285] Escape periods in filenames for license chk
Browse files Browse the repository at this point in the history
Properly escape periods in filename wildcard patterns when
excluding filenames for license checking. And while we're here,
might as well prettify the exclusion list so it's easier to read.

Change-Id: Ia596ebdfd2c250b8f6644f49a10e06d7f786802f
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
  • Loading branch information
rpjday committed Apr 2, 2018
1 parent 96c10e7 commit 5495b17
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@
#

function filterExcludedFiles {
CHECK=`echo "$CHECK" | grep -v .png$ | grep -v .rst$ | grep -v ^.git/ \
| grep -v .pem$ | grep -v .block$ | grep -v .tx$ | grep -v ^LICENSE$ | grep -v _sk$ \
| grep -v .key$ | grep -v \\.gen.go$ | grep -v ^Gopkg.lock$ | grep -v 'testdata/' \
| grep -v .md$ | grep -v ^vendor/ | grep -v ^.build/ | grep -v .pb.go$ | sort -u`
CHECK=`echo "$CHECK" \
| grep -v "^\.git/" \
| grep -v "^\.build/" \
| grep -v "^vendor/" \
| grep -v "testdata/" \
| grep -v "^LICENSE$" \
| grep -v "\.png$" \
| grep -v "\.rst$" \
| grep -v "\.pem$" \
| grep -v "\.block$" \
| grep -v "\.tx$" \
| grep -v "_sk$" \
| grep -v "\.key$" \
| grep -v "\.gen\.go$" \
| grep -v "^Gopkg\.lock$" \
| grep -v "\.md$" \
| grep -v "\.pb\.go$" \
| sort -u`
}

CHECK=$(git diff --name-only --diff-filter=ACMRTUXB HEAD)
Expand Down

0 comments on commit 5495b17

Please sign in to comment.