From ce7eefa04b3bfabdd23dd80d594041cbcfb08fba Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" Date: Fri, 8 Feb 2013 17:40:49 -0800 Subject: [PATCH] LU-1199 build: Improve git hook link installation 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 Reviewed-on: http://review.whamcloud.com/5879 Tested-by: Hudson Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Andreas Dilger --- autogen.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 5bd10be..3d04d84 100644 --- a/autogen.sh +++ b/autogen.sh @@ -4,7 +4,9 @@ # 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..." -- 1.8.3.1