Skip to content

Commit

Permalink
ci: Update shellcheck.sh to pass all args to shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
marun committed Jan 24, 2024
1 parent c0bc9f5 commit 6ede30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ SYSTEM_VERSION="$(get_version shellcheck)"
if [[ "${SYSTEM_VERSION}" == "${VERSION}" ]]; then
SHELLCHECK=shellcheck
else
SHELLCHECK="${REPO_ROOT}/build/shellcheck"
# Try to install a local version
SHELLCHECK="${REPO_ROOT}/bin/shellcheck"
LOCAL_VERSION="$(get_version "${SHELLCHECK}")"
if [[ -z "${LOCAL_VERSION}" || "${LOCAL_VERSION}" != "${VERSION}" ]]; then
if which sw_vers &> /dev/null; then
Expand All @@ -31,9 +31,9 @@ else
DIST="linux.${arch}"
fi
curl -s -L "https://github.com/koalaman/shellcheck/releases/download/${VERSION}/shellcheck-${VERSION}.${DIST}.tar.xz" | tar Jxv -C /tmp > /dev/null
mkdir -p "${REPO_ROOT}"/build
mkdir -p "$(dirname "${SHELLCHECK}")"
cp /tmp/shellcheck-"${VERSION}"/shellcheck "${SHELLCHECK}"
fi
fi

find "${REPO_ROOT}" -name "*.sh" -type f -print0 | xargs -0 "${SHELLCHECK}"
find "${REPO_ROOT}" -name "*.sh" -type f -print0 | xargs -0 "${SHELLCHECK}" "${@}"

0 comments on commit 6ede30a

Please sign in to comment.