Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # @License EPL-1.0 <http://spdx.org/licenses/EPL-1.0> |
| 4 | ############################################################################## |
| 5 | # Copyright (c) 2015 The Linux Foundation and others. |
| 6 | # |
| 7 | # All rights reserved. This program and the accompanying materials |
| 8 | # are made available under the terms of the Eclipse Public License v1.0 |
| 9 | # which accompanies this distribution, and is available at |
| 10 | # http://www.eclipse.org/legal/epl-v10.html |
| 11 | # |
| 12 | # Contributors: |
| 13 | # Thanh Ha (The Linux Foundation) - Initial implementation |
| 14 | ############################################################################## |
| 15 | |
Andrew Grimberg | e6918c3 | 2017-05-03 16:17:08 -0400 | [diff] [blame] | 16 | directory=${1:-"."} |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 17 | |
| 18 | echo "Scanning $directory" |
Andrew Grimberg | e6918c3 | 2017-05-03 16:17:08 -0400 | [diff] [blame] | 19 | if LC_ALL=C grep -r '[^[:print:][:space:]]' "$directory"; then |
| 20 | echo "Found files containing non-ascii characters." |
| 21 | exit 1 |
| 22 | fi |
Andrew Grimberg | ebc710a | 2017-01-30 12:59:38 -0800 | [diff] [blame] | 23 | |
| 24 | echo "All files are ASCII only" |
Andrew Grimberg | e6918c3 | 2017-05-03 16:17:08 -0400 | [diff] [blame] | 25 | |