~mplscorwin/git-udp-syndicate

b7532e6ca450241a19326d7225dc89e5b41345fd — Corwin Brust 9 months ago 7e8243b
* post-update(script): fixes for savannah
use socat instead of netcat
parse email logname manuall for git log without %al
1 files changed, 5 insertions(+), 4 deletions(-)

M git-udp-syndicate.post-receive
M git-udp-syndicate.post-receive => git-udp-syndicate.post-receive +5 -4
@@ 56,10 56,11 @@ do
    # use rev-parse to extract the tag/branch name
    context=$( git rev-parse --abbrev-ref $refname )

    # bring back AUTHOR and MESSAGE together using log
    rest="$( git log $newrev -1 --pretty=format:'%al %s' )"
    # bring back AUTHOR first and MESSAGE using log
    author=$( git log $newrev -1 --pretty=format:'%ae' | cut -d '@' -f 1 | tr -d '\n')
    title="$( git log $newrev -1 --pretty=format:'%s' )"

    # finally, send the message with netcat
    printf '%s %s %s %s\n' "$PROJECT" "$context" "$newrev" "$rest" |
	netcat -uq 1 "$DEST_ADDR" "$DEST_PORT" &
    printf '%s %s %s %s\n' "$PROJECT" "$context" "$newrev" "$author" "$title" |
        socat - udp:$DEST_ADDR:$DEST_PORT
done