Skip to content

Instantly share code, notes, and snippets.

@mpdaugherty
Created April 6, 2010 12:32
Show Gist options
  • Save mpdaugherty/357538 to your computer and use it in GitHub Desktop.
Save mpdaugherty/357538 to your computer and use it in GitHub Desktop.
#!/bin/sh
# Check if the individual developer has his own hook
CMD_NAME=`basename $0`
if [ -f $GIT_DIR/hooks/personal/$CMD_NAME ]
then
# If so, run it. $@ passes all the command line arguments passed to this function
# If the personal hook fails, fail this one as well
if ! $GIT_DIR/hooks/personal/$CMD_NAME $@
then
echo "User hook '$CMD_NAME' failed"
exit 1
fi
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment