[gnome-chess] Add pre-applypatch code style checker hook



commit 88704d908a5145482b2cd6e5a166f3a1b52253b3
Author: Sahil Sareen <sahil sareen hotmail com>
Date:   Sun Dec 6 11:28:50 2015 +0530

    Add pre-applypatch code style checker hook
    
      - Update autogen.sh to symlink to the style-checker
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759062

 autogen.sh |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index 5bb9757..8c10e58 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -12,8 +12,14 @@ cd $srcdir
         exit 1
 }
 
-if [ -d $srcdir/.git ] && [ ! -L $srcdir/.git/hooks/pre-commit ]; then
-        ln -s ../../../libgames-support/style-checker $srcdir/.git/hooks/pre-commit && echo "Enabled 
pre-commit style checker." || :
+# 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`


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