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



commit 579528bd3ab1969f6306d1cda5762ae24b53ffb6
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Wed Jan 13 20:04:08 2016 +0530

    Add pre-commit and pre-applypatch hooks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760533

 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]