winesapOS/git/hooks/pre-commit
2024-11-02 21:14:52 -06:00

12 lines
269 B
Bash
Executable file

#!/bin/bash
# 'find' does not always return results in the same order so it needs to be 'sort'ed.
for i in $(find . -name "*.sh" | sort)
do echo "${i}"
if ! bash -n "${i}"; then
exit 1
fi
if ! shellcheck "${i}"; then
exit 1
fi
done