diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-31 23:07:20 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-10-31 23:07:20 +1300 |
commit | 9d044a7dae36d42d620a1a6bc63a43aab9a6b8b7 (patch) | |
tree | 92b1f50e6a584611ae63778734a38f132982004b /check/bin.sh | |
parent | Merge branch 'release/v0.1.0' (diff) | |
parent | Bump version number to 0.2.0 (diff) | |
download | dotfiles-0.2.0.tar.gz (sig) dotfiles-0.2.0.zip |
Merge branch 'release/v0.2.0'v0.2.0
Diffstat (limited to 'check/bin.sh')
-rw-r--r-- | check/bin.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/check/bin.sh b/check/bin.sh index 04b0da6b..08b12778 100644 --- a/check/bin.sh +++ b/check/bin.sh @@ -1,4 +1,15 @@ +# POSIX sh for bin in bin/*.sh ; do - sh -n "$bin" || exit + sh -n -- "${bin%.sh}" || exit done -printf 'All shell scripts in bin parsed successfully.\n' +printf 'POSIX sh binscripts parsed successfully.\n' + +# GNU Bash +if command -v bash >/dev/null 2>&1 ; then + for bin in bin/*.bash ; do + bash -n -- "${bin%.bash}" || exit + done + printf 'GNU Bash binscripts parsed successfully.\n' +else + printf 'bash(1) not found, skipping GNU Bash checks.\n' +fi |