[libgames-support] autogen: enable style checker



commit 172147bf4f8b826135eee015de46fba692799a56
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jul 30 19:48:13 2016 -0500

    autogen: enable style checker
    
    That's right, we were not using the style checker in its own repo!

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


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