From d404068c910c9a953e281d3c8ac62af77e3cac24 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 10 Oct 2012 22:01:11 -0400 Subject: fix an error in checksource --- jh-checksource.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jh-checksource.sh b/jh-checksource.sh index b416427..101a187 100644 --- a/jh-checksource.sh +++ b/jh-checksource.sh @@ -16,12 +16,12 @@ find . -type f -exec file -F"$sep" {} + | while read line; do type="$(echo "$line"|sed "s${resep}.*${sep}\s*${resep}${resep}")" safe=false for filename in "${safe_files[@]}"; do - if [[ $file = "$filename" ]]; then + if [[ "$file" = "$filename" ]]; then safe=true; fi done for pattern in "${safe_patterns[@]}"; do - if [[ $type ~= "$pattern" ]]; then + if [[ "$type" =~ "$pattern" ]]; then safe=true; fi done -- cgit v1.2.3-54-g00ecf