#!/bin/bash
# This hook executes once for the receive operation. It takes no arguments, but for each ref to be updated it receives on
# standard input a line of the format:
#
#           <old-value> SP <new-value> SP <ref-name> LF
#
REFS=$( cat )
curl https://postreceive:ohfa7083.98@hudson.sapsailing.com/git/notifyCommit?url=ssh://trac@sapsailing.com/home/trac/git
if echo "$REFS" | awk '{ print $3; }' | grep "\<hyperspace\>"; then
  sudo /usr/local/bin/push_hyperspace_to_github_tools_sap
fi
