X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=scripts%2Fcheck-unicode.sh;h=10b2a31720ef9db2b48998c4e918f876872421f2;hb=a35ac65a18edd8af0638c8234e9d60857b3cee13;hp=ab20a3ec3a640d77d4f1ee60940b2730d2463143;hpb=e8f523f451e9e37df8bc69b254646dc0450590b7;p=releng%2Fbuilder.git diff --git a/scripts/check-unicode.sh b/scripts/check-unicode.sh index ab20a3ec3..10b2a3172 100755 --- a/scripts/check-unicode.sh +++ b/scripts/check-unicode.sh @@ -1,6 +1,5 @@ #!/bin/bash - -# @License EPL-1.0 +# SPDX-License-Identifier: EPL-1.0 ############################################################################## # Copyright (c) 2015 The Linux Foundation and others. # @@ -16,12 +15,9 @@ 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"