summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-08-24 00:02:04 +0200
committerErich Eckner <git@eckner.net>2017-08-24 00:02:04 +0200
commit832fa561b424e26f6d8c8d1658e8456858aec970 (patch)
treecd0a6f0c51ae246daf0007bd729df0d24b0e5ef5 /bin
parenta9db8b6d82ff3e43bdfc087cf921cd645edc79e4 (diff)
downloadbuilder-832fa561b424e26f6d8c8d1658e8456858aec970.tar.xz
bin/strict-bashism-check: also shellcheck before commiting
Diffstat (limited to 'bin')
-rwxr-xr-xbin/strict-bashism-check12
1 files changed, 12 insertions, 0 deletions
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