post-receive-hook: Introduce, sends ref-change messages to taskd
[girocco.git] / post-receive-hook
blob585ddde6d3f7369d4a8663d26e73e93af270c752
1 #!/bin/sh
3 # Send notification through the taskd socket
5 # Beware, we MAY be running in a chroot!
7 set -e
9 sockpath=/etc/taskd.socket
10 if [ -x /usr/bin/perl ]; then
11 # Not in chroot...
12 . @basedir@/shlib.sh
14 sockpath="$cfg_chroot/$sockpath"
17 [ -S "$sockpath" ] || exit 0
19 while read line; do
20 echo "ref-change $line"
21 done | /bin/nc.openbsd -w 1 -U "$sockpath" >/dev/null
23 exit