jobd/update.sh: Handle changed baseurl - update remote.origin.url
[girocco/mytab.git] / post-receive-hook
blobf85925b7611bae625a3bb6492c7aa58dfef6a199
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"
25 done | /bin/nc.openbsd -w 1 -U "$sockpath"
27 exit