Files
git-hooks/hooks/post-receive
Joel Brobecker 228cf0682c post-receive, update: Update hardcoded path to Git & Python.
sourceware now provides a more central location where specific versions
of some tools can be installed. Git and Python have now been installed
there, so update the scripts accordingly.
2014-12-26 18:46:09 +04:00

31 lines
1.0 KiB
Bash
Executable File

#! /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:
#
# <oldrev> <newrev> <refname>
#
# 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 `dirname $0`/post_receive.py "$@"