diff options
Diffstat (limited to 'lint/bin.sh')
-rw-r--r-- | lint/bin.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lint/bin.sh b/lint/bin.sh index 0fe82d7a..6037ca55 100644 --- a/lint/bin.sh +++ b/lint/bin.sh @@ -1 +1,19 @@ -find bin -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} + +# POSIX sh +set -- +for bin in bin/*.sh ; do + set -- "$@" "${bin%.sh}" +done +shellcheck -e SC1090 -- "$@" || exit +printf 'POSIX shell binscripts linted successfully.\n' + +# GNU Bash +if command -v bash >/dev/null 2>&1 ; then + set -- + for bin in bin/*.bash ; do + set -- "$@" "${bin%.bash}" + done + shellcheck -e SC1090 -- "$@" || exit + printf 'GNU Bash binscripts linted successfully.\n' +else + printf 'bash(1) not found, skipping GNU Bash lint.\n' +fi |