[gnome-chess] autogen: simplify style checker enablement



commit e7ecec82a6cd7051b9f02b51cdb127bf24200ea7
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Sat Jul 30 20:07:39 2016 -0500

    autogen: simplify style checker enablement

 autogen.sh |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index ace9e51..b61b287 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -14,12 +14,11 @@ cd $srcdir
 
 # 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
+       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' configure.ac`


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