Merge "Exclude test cases labeled with skip_if_{stream}"
[releng/builder.git] / scripts / check-unicode.sh
index ab20a3ec3a640d77d4f1ee60940b2730d2463143..931c99fac8a2c9d9c38369d372bdac6a4c7e7dc8 100755 (executable)
 directory=${1:-"."}
 
 echo "Scanning $directory"
-while IFS= read -r -d '' x
-do
-    if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then
-        echo "file $x contains non-ascii characters"
-        exit 1
-    fi
-done < <(find "$directory" -type f -print0)
+if LC_ALL=C grep -r '[^[:print:][:space:]]' "$directory"; then
+    echo "Found files containing non-ascii characters."
+    exit 1
+fi
 
 echo "All files are ASCII only"
+