From aed54358fee5927f9b4913566d84b92255e08e12 Mon Sep 17 00:00:00 2001 From: Dave Hibberd Date: Sat, 28 Oct 2023 15:35:32 +0100 Subject: New upstream version 20231027 --- tools/check_commit.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tools/check_commit.sh') diff --git a/tools/check_commit.sh b/tools/check_commit.sh index c92c2b0..6158a47 100755 --- a/tools/check_commit.sh +++ b/tools/check_commit.sh @@ -83,7 +83,10 @@ existing_drivers=$(git ls-tree --name-only $BASE chirp/drivers/) limit=20 for nf in $added_files; do for of in $existing_drivers; do - change=$(wdiff -s $of $nf | grep $of | sed -r 's/.* ([0-9]+)% changed/\1/') + change=$(wdiff -s $of $nf | grep -I $of | sed -r 's/.* ([0-9]+)% changed/\1/') + if [ ! "$change" ]; then + continue + fi if [ "$change" -lt "$limit" ]; then fail "New file $nf shares at least $((100 - $change))% with $of!" fi -- cgit v1.2.3