validate.sh 410 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  2. # Part of Zombie Navigator
  3. # Copyright © 2015 Zombie Navigator Developers
  4. dir="`dirname "$0"`"
  5. cd "$dir"
  6. # Look for checkbashisms
  7. if ! which checkbashisms >/dev/null 2>&1 ; then
  8. echo "Please install checkbashisms somewhere in PATH" >&2
  9. exit 1
  10. fi
  11. checkbashisms -n ./*.sh && {
  12. echo "[OK] Valid /bin/sh scripts!" >&2
  13. } || {
  14. echo "[ERROR] Bashisms found!" >&2
  15. exit 2
  16. }
  17. # vim: ts=4 noet ai