Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A git commit hook runner, for running multiple commit scripts
#!/bin/bash
#
# Collection of pre-commit hooks
#
set -e
# Get directory of script file
ME=$0
if [ -h ${ME} ]; then
# dereference if it is a symlink (hint: OS X does not support readlink -f)
ME=`readlink $0`
fi
# Ideally this should happen, but it makes files look changed in
# Emacs, which is super annoying.
#
# git stash -q --keep-index
# trap "git stash pop -q" EXIT
BINDIR=$(dirname ${ME})
# Run checks
${BINDIR}/string_check.py $*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment