zammad-docker-compose/.github/lint-scripts.sh
2020-02-26 17:54:14 +01:00

24 lines
429 B
Bash
Executable File

#!/bin/sh
#
# lint bash scripts
#
set -o errexit
CONFIG_DIR=".github"
HOOKS_DIR="hooks"
CONTAINER_DIR="containers"
TMP_FILE="$(mktemp)"
find "${CONFIG_DIR}" -type f -name "*.sh" > "${TMP_FILE}"
find "${HOOKS_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
find "${CONTAINER_DIR}" -type f -name "*.sh" >> "${TMP_FILE}"
while read -r FILE; do
echo lint "${FILE}"
shellcheck -x "${FILE}"
done < "${TMP_FILE}"
rm "${TMP_FILE}"