aboutsummaryrefslogtreecommitdiff
path: root/check/bin.sh
blob: 61b46af87b7514a9ee20c87c12cda94d937e2fd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# POSIX shell
for bin in bin/*.sh ; do
    sh -n -- "${bin%.sh}" || exit
done
printf 'POSIX shell 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