chiark / gitweb /
Don't call pre-commit hook if tg is not installed
authorCarsten Hey <carsten@debian.org>
Sat, 10 Apr 2010 13:20:10 +0000 (15:20 +0200)
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sat, 10 Apr 2010 13:20:26 +0000 (15:20 +0200)
Signed-off-by: Carsten Hey <carsten@debian.org>
Closes: http://bugs.debian.org/576221
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
tg.sh

diff --git a/tg.sh b/tg.sh
index 91c374a..9d08d63 100644 (file)
--- a/tg.sh
+++ b/tg.sh
@@ -54,6 +54,8 @@ setup_hook()
        else
                hook_call="exec $hook_call"
        fi
+       # Don't call hook if tg is not installed
+       hook_call="if which \"$tg\" > /dev/null; then $hook_call; fi"
        # Insert call into the hook
        {
                echo "#!/bin/sh"