1 2 3 4 5 6 7 8 9 10 11 12
#!/bin/bash failed=0 for filename in hooks/pre-commit.*; do if [ -f "hooks/$filename" ]; then if $("./hooks/$filename") != "0"; then failed=1 fi fi done exit failed