[swell-foop] Add pre-commit and pre-applypatch hooks



commit ba81755ba90fa4e4e1a259d513034cf656a066a2
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Tue Dec 22 18:24:36 2015 +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]