generic 407 B

12345678910111213
  1. #!/bin/sh
  2. # Generic hook, installs itself as a valid githook(5) and runs whatever it
  3. # finds on hacking.hook.$self
  4. # Format:
  5. # hacking.hooks.post-receive.auto-deploy /srv/http/markpower.hackcoop.com.ar
  6. git config -f config --get-regexp "hacking.hooks.$(basename ${0}).*" | \
  7. while read hook repo; do
  8. hook="`echo "${hook}" | cut -d'.' -f4`"
  9. ${HOME}/.ssh/git-hooks/${hook} ${repo} ${@} </dev/stdin
  10. done