From 46ae6ad6151e3a05d80a0d7cfd9e44841fb4bcfd Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Tue, 16 Aug 2016 18:26:19 +0200 Subject: Initial version of the ci-management repo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on the open-o template. Modified for AGL. v2 fixed host key and only pushing ci-management jobs. - fix macro vs. definition in file Change-Id: I2de02a572a5d8ca1bf6b7a56bfd2e30bfe18fa9a Signed-off-by: Jan-Simon Möller --- scripts/.gitkeep | 0 scripts/check-unicode.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 scripts/.gitkeep create mode 100755 scripts/check-unicode.sh (limited to 'scripts') diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/scripts/check-unicode.sh b/scripts/check-unicode.sh new file mode 100755 index 00000000..db45f6ac --- /dev/null +++ b/scripts/check-unicode.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# @License EPL-1.0 +############################################################################## +# Copyright (c) 2015 The Linux Foundation and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License v1.0 +# which accompanies this distribution, and is available at +# http://www.eclipse.org/legal/epl-v10.html +# +# Contributors: +# Thanh Ha (The Linux Foundation) - Initial implementation +############################################################################## + +directory="." +if [ ! -z "$1" ]; then + directory="$1" +fi + +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 + +echo "All files are ASCII only" -- cgit 1.2.3-korg