From 45def315942bd51c148e20035c601dd1253cd53c Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Sat, 24 Apr 2021 09:30:46 +0200 Subject: [PATCH] Improvements to CI script --- ci/run_shellcheck.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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