post-receive (325B)
1 #!/usr/bin/env sh 2 data=$(cat) 3 exitcodes="" 4 hookname=$(basename $0) 5 GIT_DIR=${GIT_DIR:-$(dirname $0)/..} 6 7 for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do 8 test -x "${hook}" && test -f "${hook}" || continue 9 echo "${data}" | "${hook}" 10 exitcodes="${exitcodes} $?" 11 done 12 13 for i in ${exitcodes}; do 14 [ ${i} -eq 0 ] || exit ${i} 15 done