As many of you probably know, there can be only one hook type in git. If two update hooks need to be evaluated. The git admin is left with two unmanageable solutions:
- Merge the hook scripts together
- Manually chain them with an
exec
I am looking for an elegant solution (written in BASH),something like a folder hooks/update.d
or hooks/post-receive.d
that will allow the loosely coupling of hook evaluations. The chaining should stop as soon as a hook fails.
I actually found an acceptable solution written in perl at this URL http://blog.bluefeet.net/2011/08/chained-git-hooks
The problem: my server runs different versions of perl and I am getting perllib version mismatches. It fails.
for hook in hooks/update.d/*; do ...
)