本站源代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
303B

  1. #!/usr/bin/env bash
  2. data=$(cat)
  3. exitcodes=""
  4. hookname=$(basename $0)
  5. GIT_DIR=${GIT_DIR:-$(dirname $0)}
  6. for hook in ${GIT_DIR}/hooks/${hookname}.d/*; do
  7. test -x "${hook}" || continue
  8. echo "${data}" | "${hook}"
  9. exitcodes="${exitcodes} $?"
  10. done
  11. for i in ${exitcodes}; do
  12. [ ${i} -eq 0 ] || exit ${i}
  13. done
上海开阖软件有限公司 沪ICP备12045867号-1