From 3e5c2d1940f95796cb9ceb726d04b653a3e65dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Bauer?= Date: Wed, 26 Feb 2020 18:17:01 +0100 Subject: [PATCH] use repo root to find bash scripts --- .github/lint-scripts.sh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/lint-scripts.sh b/.github/lint-scripts.sh index 194b74d..21fe3ba 100755 --- a/.github/lint-scripts.sh +++ b/.github/lint-scripts.sh @@ -5,15 +5,10 @@ set -o errexit -CONFIG_DIR=".github" -HOOKS_DIR="hooks" -CONTAINER_DIR="containers" - +REPO_ROOT="$(git rev-parse --show-toplevel)" 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}" +find "${REPO_ROOT}" -type f -name "*.sh" > "${TMP_FILE}" while read -r FILE; do echo lint "${FILE}"