index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-03-07 16:29:58 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-03-07 16:29:58 +0100 |
commit | 98c468dee44e09a27c89019c3d8c584efe0bf1c0 (patch) | |
tree | 7bdba85af27eb47c96d7136c71bd508f6da92a4c /bin | |
parent | b90c2a7164a911a0fc30230f2817cbc3a65b4a86 (diff) |
-rwxr-xr-x | bin/strict-bashism-check | 22 |
diff --git a/bin/strict-bashism-check b/bin/strict-bashism-check index b1bd3bf..fa073b8 100755 --- a/bin/strict-bashism-check +++ b/bin/strict-bashism-check @@ -72,14 +72,16 @@ if [ -n "${errors}" ]; then 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 +if which shellcheck >/dev/null 2>&1; then + 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 fi |