From 832fa561b424e26f6d8c8d1658e8456858aec970 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 24 Aug 2017 00:02:04 +0200 Subject: bin/strict-bashism-check: also shellcheck before commiting --- bin/strict-bashism-check | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bin/strict-bashism-check') diff --git a/bin/strict-bashism-check b/bin/strict-bashism-check index 9029471..e477213 100755 --- a/bin/strict-bashism-check +++ b/bin/strict-bashism-check @@ -83,3 +83,15 @@ if [ -n "${errors}" ]; then >&2 echo "${errors}" exit 1 fi + +errors=$( + cd "${tmp_dir}" || \ + echo 'Cannot cd.' + shellcheck -x bin/* conf/* 2>&1 +) + +if [ -n "${errors}" ]; then + >&2 echo 'shellcheck complains about the following:' + >&2 echo "${errors}" + exit 1 +fi -- cgit v1.2.3-70-g09d2