1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #!/bin/sh # run all post-receive.* hooks in custom-hooks/ if [ ! -d custom-hooks ]; then exit fi FILE="`mktemp`" cat - > "$FILE" for i in custom-hooks/post-receive.*; do [ -x "$i" ] && cat "$FILE" | "$i" done rm "$FILE" |