1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash -ex pushd "$(dirname "$0")" has_error=0 while IFS= read -d $'\0' -r script ; do echo "$script" if ! shellcheck -e SC1091 "$script" ; then has_error=1 fi done < <(find .. -name '*.sh' -print0) exit "$has_error"