* #8542: test for .git existence before moving pre-commit hook

This commit is contained in:
Tristan Matthews
2012-02-07 10:18:30 -05:00
parent f8bfdfaa84
commit 4a54020d0c

View File

@ -5,10 +5,13 @@ mkdir -p m4
HOOKS_DIR="../.git/hooks"
# install pre-commit hook for doing clean commits
if test ! \( -x ${HOOKS_DIR}/pre-commit -a -L ${HOOKS_DIR}/pre-commit \);
if [ -d "$HOOKS_DIR" ];
then
rm -f ${HOOKS_DIR}/pre-commit
ln -s ${HOOKS_DIR}/pre-commit.sample ${HOOKS_DIR}/pre-commit
if test ! \( -x ${HOOKS_DIR}/pre-commit -a -L ${HOOKS_DIR}/pre-commit \);
then
rm -f ${HOOKS_DIR}/pre-commit
ln -s ${HOOKS_DIR}/pre-commit.sample ${HOOKS_DIR}/pre-commit
fi
fi
autoreconf --force --install --verbose -Wall -I m4