README: Describe forks
[girocco.git] / post-receive-hook
blobfefdc273f3528116010bace8e28a3c8b756af380
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 cwd="$(pwd)"
11 if [ -x /usr/bin/perl ]; then
12 # Not in chroot...
13 . @basedir@/shlib.sh
15 sockpath="$cfg_chroot/$sockpath"
16 projname="${cwd#$cfg_reporoot/}"
17 else
18 projname="${cwd#/srv/git/}"
21 [ -S "$sockpath" ] || exit 0
23 while read line; do
24 echo "ref-change $UID ${projname%.git} $line" | /bin/nc.openbsd -w 1 -U "$sockpath"
25 done
27 exit