From 724be6c8f355778efc4e8595f7684d993e9e80ba Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 4 Nov 2009 13:05:09 +0100 Subject: [PATCH] post-receive-hook: Send also project name --- post-receive-hook | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/post-receive-hook b/post-receive-hook index c2c1251..12acde8 100755 --- a/post-receive-hook +++ b/post-receive-hook @@ -7,17 +7,21 @@ set -e sockpath=/etc/taskd.socket +cwd="$(pwd)" if [ -x /usr/bin/perl ]; then # Not in chroot... . @basedir@/shlib.sh sockpath="$cfg_chroot/$sockpath" + projname="${cwd#$cfg_reporoot/}" +else + projname="${cwd#/srv/git/}" fi [ -S "$sockpath" ] || exit 0 while read line; do - echo "ref-change $line" + echo "ref-change $projname $line" done | /bin/nc.openbsd -w 1 -U "$sockpath" exit -- 2.11.4.GIT