#! /usr/bin/env bash # This script is expected to be called with the following arguments: # (1) refname: The name of the reference being updated # (refs/heads/master, for instance). # (2) oldrev: This is the commit that the reference was pointing to # before the update. # (3) newrev: This is the commit that the ref should point to, if # the update is accepted. # # This script should return 0 if the update should be allowed, # and nonzero otherwise. # The following safety checks verify that the script is being # called correctly. They have been copied directly from the # sample "update" script provided by git. if [ -z "$GIT_DIR" ]; then echo "Don't run this script from the command line." >&2 echo " (if you want, you could supply GIT_DIR then run" >&2 echo " $0 )" >&2 exit 1 fi # 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 # Similarly, update the PATH and LD_LIBRARY_PATH to include the location # where cvs_check is installed. for cvs_check_dir in /svn/Dev/hooks /usr/local/svn-hooks \ /jouy.a/web/services/gnos/bin; do if [ -d $cvs_check_dir ]; then export PATH=$cvs_check_dir:$PATH export LD_LIBRARY_PATH=$cvs_check_dir/cvs_check.libs:$LD_LIBRARY_PATH fi done python -u `dirname $0`/update.py "$@"