#!/bin/bash # gentoo-infra: infra/githooks.git:local/post-receive declare -a HOOKS=( hooks/post-receive.gentoo-commits hooks/post-receive.cfengine-sync hooks/post-receive.dns-sync hooks/post-receive.masterportage-acl-sync hooks/post-receive.puppet-sync ) stdin=$(cat) for hook in ${HOOKS[@]}; do if [[ -x ${hook} ]]; then echo "${stdin}" | ./"${hook}" fi done