From 898b6a20b08e81a4acc8b856ab0e8a6faa8ba21f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 7 May 2020 09:36:27 +0200 Subject: [PATCH] Move run-shellcheck to scripts/ --- run-shellcheck.sh => scripts/run-shellcheck.sh | 3 +++ 1 file changed, 3 insertions(+) rename run-shellcheck.sh => scripts/run-shellcheck.sh (89%) diff --git a/run-shellcheck.sh b/scripts/run-shellcheck.sh similarity index 89% rename from run-shellcheck.sh rename to scripts/run-shellcheck.sh index c0532e0..769f853 100755 --- a/run-shellcheck.sh +++ b/scripts/run-shellcheck.sh @@ -6,6 +6,9 @@ SHELLCHECKCMD="shellcheck -s sh -f gcc -x" SHELLCHECK_SKIP=': __.*is referenced but not assigned.*\[SC2154\]' SHELLCHECKTMP=".shellcheck.tmp" +# Move to top-level cdist-contrib directory. +cd $(dirname $0)/.. + check () { find type/ -type f $1 $2 -exec ${SHELLCHECKCMD} {} + | grep -v "${SHELLCHECK_SKIP}" > "${SHELLCHECKTMP}" test ! -s "${SHELLCHECKTMP}" || { cat "${SHELLCHECKTMP}"; exit 1; }