Fixed the detection of the paths to the commit hooks.

The symlinks to the post commit/post update scripts are absolute path symlinks, so a simple readlink is used. The  is relative, so a bit of shell skill is used to resolve the path to the absolute path.
This commit is contained in:
Loïc d'Anterroches 2011-01-09 11:02:27 +01:00
parent c67e61cbaa
commit fa974eb8dd
3 changed files with 3 additions and 10 deletions

View File

@ -17,11 +17,8 @@
# git$ ln -s /home/www/indefero/scripts/git-post-update post-update # git$ ln -s /home/www/indefero/scripts/git-post-update post-update
# #
dir=$(dirname "$0") SCRIPTDIR=$(dirname $(readlink $0))
res=$(cd "$dir" && /bin/pwd || "$dir")
SCRIPTDIR="$res/$(readlink $0)"
FULL_GIT_DIR=$(cd "$GIT_DIR" && /bin/pwd || "$GIT_DIR") FULL_GIT_DIR=$(cd "$GIT_DIR" && /bin/pwd || "$GIT_DIR")
PHP_POST_UPDATE=$SCRIPTDIR/gitpostupdate.php PHP_POST_UPDATE=$SCRIPTDIR/gitpostupdate.php
echo php $PHP_POST_UPDATE $FULL_GIT_DIR | at now > /dev/null 2>&1 echo php $PHP_POST_UPDATE $FULL_GIT_DIR | at now > /dev/null 2>&1

View File

@ -18,9 +18,7 @@
# www$ ln -s /home/www/indefero/scripts/svn-post-commit post-commit # www$ ln -s /home/www/indefero/scripts/svn-post-commit post-commit
# #
dir=$(dirname "$0") SCRIPTDIR=$(dirname $(readlink $0))
res=$(cd "$dir" && /bin/pwd || "$dir")
SCRIPTDIR="$res/$(readlink $0)"
PHP_POST_COMMIT=$SCRIPTDIR/svnpostcommit.php PHP_POST_COMMIT=$SCRIPTDIR/svnpostcommit.php
echo php $PHP_POST_COMMIT "$1" "$2" | at now > /dev/null 2>&1 echo php $PHP_POST_COMMIT "$1" "$2" | at now > /dev/null 2>&1

View File

@ -18,9 +18,7 @@
# www$ ln -s /home/www/indefero/scripts/svn-post-revprop-change post-revprop-change # www$ ln -s /home/www/indefero/scripts/svn-post-revprop-change post-revprop-change
# #
dir=$(dirname "$0") SCRIPTDIR=$(dirname $(readlink $0))
res=$(cd "$dir" && /bin/pwd || "$dir")
SCRIPTDIR="$res/$(readlink $0)"
PHP_POST_REVPROP=$SCRIPTDIR/svnpostrevpropchange.php PHP_POST_REVPROP=$SCRIPTDIR/svnpostrevpropchange.php
echo php $PHP_POST_REVPROP "$1" "$2" "$3" "$4" "$5" | at now > /dev/null 2>&1 echo php $PHP_POST_REVPROP "$1" "$2" "$3" "$4" "$5" | at now > /dev/null 2>&1