code.gitea.io/gitea@v1.21.7/tests/gitea-repositories-meta/user27/template1.git/hooks/post-receive (about) 1 #!/usr/bin/env bash 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