X-Git-Url: https://git.ctpug.org.za/?a=blobdiff_plain;f=irker;h=436e190c0486b89ee03acb1fcb262b8dd1b31123;hb=ceceb3aa1d5209d2015a2acb55486ce70436e2a6;hp=ab0b10a55c154e73f0f0088c40f761becb5f8a25;hpb=ecd6ec9bce116f2f0cf40266db406dd748ed45e1;p=gitolite-hooks.git diff --git a/irker b/irker index ab0b10a..436e190 100755 --- a/irker +++ b/irker @@ -1,8 +1,8 @@ #!/bin/bash -IRKERPATH=/home/irker/VE/bin/ +IRKERPATH=/usr/bin/ -function help() { +function help_irker() { echo "Required config settings:" echo " git config irker.channels 'channel1 channel2 ..'" echo " git config irker.project 'Project name'" @@ -16,12 +16,15 @@ function notify_irker() { new=$2 refname=$3 + echo "irker $1 $2 $3" + return + if [ "x$old" = "x0000000000000000000000000000000000000000" ]; then # We're pushing into an empty repo, so we need a different command # to get the rev list # This does the wrong thing if the parent of the branch isn't master # but it is kind of correct most of the time - ${IRKERPATH}/irkerhook.py --refname=${refname} \ + ${IRKERPATH}/irkerhook --refname=${refname} \ $(git rev-list $new --not master) elif [ "x$new" = "x0000000000000000000000000000000000000000" ]; then # We're deleting a branch - we need to do the right thing @@ -32,19 +35,7 @@ function notify_irker() { ${IRKERPATH}/irk $channel "$repo: Deleted branch $refname" done else - ${IRKERPATH}/irkerhook.py --refname=${refname} \ + ${IRKERPATH}/irkerhook --refname=${refname} \ $(git rev-list --reverse ${old}..${new}) fi } - -channels=$(git config --get irker.channels) - -while read line; do - set -- $line - if [ -n "$channels" ]; then - notify_irker $* - fi - RET=$? -done - -exit $RET