diff --git a/ci/run_shellcheck.sh b/ci/run_shellcheck.sh index 0b32cbc..cab0bca 100755 --- a/ci/run_shellcheck.sh +++ b/ci/run_shellcheck.sh @@ -6,10 +6,16 @@ set -o nounset set -o errtrace shopt -s inherit_errexit -ci/run_shellcheck mkdir -p /opt/shellcheck -[[ ! -e /opt/shellcheck/shellcheck ]] && wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz - | tar -xJv -O shellcheck-stable/shellcheck | sudo tee /opt/shellcheck/shellcheck - > /dev/null || true -sudo chmod +x /opt/shellcheck/shellcheck +if [[ ! -e /opt/shellcheck/shellcheck ]]; then + mkdir -p /opt/shellcheck + + wget -qO- https://github.com/koalaman/shellcheck/releases/download/stable/shellcheck-stable.linux.x86_64.tar.xz \ + | tar xJv -O shellcheck-stable/shellcheck \ + > /opt/shellcheck/shellcheck + + chmod +x /opt/shellcheck/shellcheck +fi + /opt/shellcheck/shellcheck --version -/opt/shellcheck/shellcheck $(grep -lzP '^#!/bin/\\w+sh' -r .) + +grep -lZP '^#!/bin/\w+sh' -R | xargs -0 /opt/shellcheck/shellcheck