Check for .git/hooks directory before trying anything else. Removes
one barrier to compiling lustre without .git being present.
Change-Id: I5fdf8fae9a4958099a40772d927fa59e42446a5b
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/5879
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
# install Lustre Git commit hooks by default - LU-2083
for HOOK in commit-msg prepare-commit-msg; do
- [ -e .git/hooks/$HOOK ] || ln -sf ../../build/$HOOK .git/hooks/
+ if [ -d .git/hooks -a ! -e .git/hooks/$HOOK ]; then
+ ln -sf ../../build/$HOOK .git/hooks/
+ fi
done
echo "Checking for a complete tree..."