diff options
author | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-05-03 16:17:08 -0400 |
---|---|---|
committer | Andrew Grimberg <agrimberg@linuxfoundation.org> | 2017-05-03 16:17:08 -0400 |
commit | e6918c3a4f9dd6e90a811e0172fd11104a4f4472 (patch) | |
tree | 05f3605be4653c353e586b7c7b15e92627ec7032 /scripts | |
parent | 4aca8a896e73df7736c625021f99309328661e62 (diff) |
Initial coala delint (scripts)
Initial coala delint for global scripts
Issue: CIMAN-2
Change-Id: Ia1ef0585b8c929ce25aebaa0178b039e0ac6f93e
Signed-off-by: Andrew Grimberg <agrimberg@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/check-unicode.sh | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/check-unicode.sh b/scripts/check-unicode.sh index db45f6ac6..931c99fac 100755 --- a/scripts/check-unicode.sh +++ b/scripts/check-unicode.sh @@ -13,17 +13,13 @@ # Thanh Ha (The Linux Foundation) - Initial implementation ############################################################################## -directory="." -if [ ! -z "$1" ]; then - directory="$1" -fi +directory=${1:-"."} echo "Scanning $directory" -for x in $(find $directory -type f); do - if LC_ALL=C grep -q '[^[:print:][:space:]]' "$x"; then - echo "file "$x" contains non-ascii characters" - exit 1 - fi -done +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" + |