[gnome-nibbles] Add pre-applypatch style-checker hook
- From: Sahil Sareen <ssareen src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Add pre-applypatch style-checker hook
- Date: Sun, 6 Dec 2015 07:58:53 +0000 (UTC)
commit 2c7a716845704fd5f7ff49b63be28638588aee4c
Author: Sahil Sareen <sahil sareen hotmail com>
Date: Sun Dec 6 13:26:45 2015 +0530
Add pre-applypatch style-checker hook
- Update autogen.sh:
- Check if symlink exists
- Use both pre-commit and pre-applypatch hooks
autogen.sh | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index e6b7433..8c10e58 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -12,8 +12,14 @@ cd $srcdir
exit 1
}
-if [ -d $srcdir/.git ] && [ ! -e $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]