From d2ee4678d77fdd200e722ef693b78f487b87fcda Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Mon, 25 Nov 2024 13:28:42 +0100 Subject: [PATCH] source/check --- sh/main.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sh/main.sh b/sh/main.sh index e037089..bb7c2bc 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -8,6 +8,17 @@ SH_MAIN="${SH_ROOT}/main.sh" [ -n "${ENV}" ] || export ENV="${SH_MAIN}" +sh_source_check() { + local file=".shellcheck.sh" + find \ + -type "f" \ + -name "*.sh" \ + -printf ". \"%P\"\n" \ + >"${file}" + shellcheck "${file}" + rm "${file}" +} + _sh_main_commands() { local file="${1}" grep "()" "${file}" |