tools/shellcheck.sh: allow overriding the shellcheck path
[babeltrace.git] / tools / shellcheck.sh
index 6cf23b3b1e7f485da8483eaf91e1e43051ca6f26..100e2582275f66536a6f797f07a0c820730775c2 100755 (executable)
@@ -6,12 +6,13 @@
 
 set -eu
 
+shellcheck=${SHELLCHECK:-shellcheck}
 retcode=0
 
 while read -r script_file; do
        echo "Running ShellCheck on \`$script_file\`"
        pushd "${script_file%/*}" >/dev/null
-       shellcheck -x "${script_file##*/}" || retcode=$?
+       "$shellcheck" -x "${script_file##*/}" || retcode=$?
        popd >/dev/null
 done <<< "$(find . -type f -name '*.sh' \
        ! -path './.git/*' \
This page took 0.023609 seconds and 4 git commands to generate.