#!/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"
