hooks: find ourselves before seeking elsewhere
Two of the mob hook scripts simply redirect to the same-named hook
scripts in the non-mob repository (pre-receive and post-receive).
They have been assuming that the script to hand off to (via exec)
can be found in the $PWD/../hooks directory.
But now, with the hand of friendship (reluctant tolerance) extended
to linked working trees, all sorts of wierd **** can happen.
Instead of relying on the value of the current working directory,
use the actual script's location (as determined using a combination
of the current working directory and $0) as the starting point to
locate the script to hand off to.
Since the scripts themselves will always be in the same location
no matter what kind of repository (bare, non-bare, main working
tree, linked working tree, local, remote) is involved, this provides
a much more reliable technique that works for every access method.
Signed-off-by: Kyle J. McKay <mackyle@gmail.com>