[gnome-klotski] Add pre-commit and pre-applypatch hooks



commit a1e5bb626faadfc03a4ecd1dc04bbd4e8b8a4227
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Sat Jan 16 16:58:04 2016 +0530

    Add pre-commit and pre-applypatch hooks

 autogen.sh |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 0f80d5d..941dd06 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -12,6 +12,16 @@ cd $srcdir
         exit 1
 }
 
+# Use the style-checker as pre-commit and pre-applypatch hooks
+if [ -d $srcdir/.git ]; then
+        if [ ! -L $srcdir/.git/hooks/pre-commit ]; then
+            ln -s ../../../libgames-support/style-checker $srcdir/.git/hooks/pre-commit && echo "Enabled 
pre-commit style checker." || :
+        fi
+        if [ ! -L $srcdir/.git/hooks/pre-applypatch ]; then
+            ln -s ../../../libgames-support/style-checker $srcdir/.git/hooks/pre-applypatch && echo "Enabled 
pre-applypatch style checker." || :
+        fi
+fi
+
 PKG_NAME=`autoconf --trace 'AC_INIT:$1' configure.ac`
 
 if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]