X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=tools%2Fshellcheck.sh;h=b03023e846004acf691dfbd956eeb9c306a5db80;hb=HEAD;hp=6cf23b3b1e7f485da8483eaf91e1e43051ca6f26;hpb=86a9f7d3ddc61ee4eded90bfa4c15bf828c1209d;p=babeltrace.git diff --git a/tools/shellcheck.sh b/tools/shellcheck.sh index 6cf23b3b..b03023e8 100755 --- a/tools/shellcheck.sh +++ b/tools/shellcheck.sh @@ -6,16 +6,17 @@ 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/*' \ - ! -path ./config/ltmain.sh \ + ! -path ./config/ltmain.sh \ ! -path ./tests/utils/tap-driver.sh \ ! -path ./tests/utils/tap/tap.sh)"