Created
April 2, 2013 13:40
-
-
Save beaufour/5292277 to your computer and use it in GitHub Desktop.
A git commit hook runner, for running multiple commit scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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