1
0
mirror of https://github.com/openshift/installer.git synced 2026-02-05 15:47:14 +01:00
Files
installer/hack/shellcheck.sh
Steve Milner c234fc3f95 *: use podman instead of docker
Signed-off-by: Steve Milner <smilner@redhat.com>
2018-09-11 15:19:08 -07:00

16 lines
438 B
Bash
Executable File

#!/bin/sh
if [ "$IS_CONTAINER" != "" ]; then
TOP_DIR="${1:-.}"
find "${TOP_DIR}" \
-path "${TOP_DIR}/vendor" -prune \
-o -path "${TOP_DIR}/.build" -prune \
-o -type f -name '*.sh' -exec shellcheck --format=gcc {} \+
else
podman run --rm \
--env IS_CONTAINER=TRUE \
--volume "${PWD}:/workdir:ro,z" \
--entrypoint sh \
quay.io/coreos/shellcheck-alpine:v0.5.0 \
/workdir/hack/shellcheck.sh /workdir
fi;