Skip to content

Commit

Permalink
Make pre-commit hook work with submodules
Browse files Browse the repository at this point in the history
  • Loading branch information
sjoelund committed May 18, 2015
1 parent ec62513 commit d52ab4e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions m4/pre-commit.m4
@@ -1,4 +1,7 @@
if test -d .git && test ! -f .git/hooks/pre-commit; then
ln -s ../../common/pre-commit.sh .git/hooks/pre-commit
AC_MSG_NOTICE([OpenModelica pre-commit hook has been installed])
if test -e .git; then
GIT_DIR=`git rev-parse --git-dir`
if test ! -f "$GIT_DIR/hooks/pre-commit"; then
ln -s "`pwd`/common/pre-commit.sh" "$GIT_DIR/hooks/pre-commit"
AC_MSG_NOTICE([OpenModelica pre-commit hook has been installed])
fi
fi

0 comments on commit d52ab4e

Please sign in to comment.