mirror of
https://github.com/AdaCore/git-hooks.git
synced 2026-02-12 12:43:11 -08:00
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.
31 lines
1.0 KiB
Bash
Executable File
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 "$@"
|