#! /usr/bin/env bash # # The "post-receive" script is run after receive-pack has accepted a pack # and the repository has been updated. It is passed arguments in through # stdin in the form: # # # # For example: # # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master # The following is sourceware-specific. Some of the tools installed # on that machine are too old, causing some really interesting features # to be missing (Eg: python's OrderedDict, for instance, or git's %B # format placeholder). So, local installs of more recent versions have # been placed in /opt/rh/[...]. for tool in git19 python27 do if [ -f /opt/rh/$tool/enable ]; then . /opt/rh/$tool/enable fi done # The following is AdaCore-specific: It allows us to make sure that # we are not running a random version of Python, but rather the # baseline version installed in /gnatmail. export PATH=/gnatmail/local/gnatpython/bin:$PATH python -u `dirname $0`/post_receive.py "$@"