You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2013/05/13 20:01:25 UTC
svn commit: r1481997 - /ofbiz/trunk/tools/functions.sh
Author: doogie
Date: Mon May 13 18:01:25 2013
New Revision: 1481997
URL: http://svn.apache.org/r1481997
Log:
FEATURE: Add ability to call an external hook script; this can be useful
for redirecting runtime/data/derby to /dev/shm, for greatly speeding up
test cases.
Modified:
ofbiz/trunk/tools/functions.sh
Modified: ofbiz/trunk/tools/functions.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/tools/functions.sh?rev=1481997&r1=1481996&r2=1481997&view=diff
==============================================================================
--- ofbiz/trunk/tools/functions.sh (original)
+++ ofbiz/trunk/tools/functions.sh Mon May 13 18:01:25 2013
@@ -64,6 +64,9 @@ git_rebase_runner() {
total_loops="$1"
cleaner="$2"
shift 2
+ if [ -e runtime/git-rebase/hook.sh ]; then
+ runtime/git-rebase/hook.sh start $total_loops || break
+ fi
eval "$cleaner"
while [ $total_loops -gt 0 ]; do
git_rebase_runner_success=0
@@ -74,12 +77,21 @@ git_rebase_runner() {
# POSIX tee does not support -a, so we have to run everything
# inside a single redirection.
{
+ if [ -e runtime/git-rebase/hook.sh ]; then
+ runtime/git-rebase/hook.sh pre-run $total_loops || break
+ fi
eval "$@" || break
eval "$cleaner" || break
+ if [ -e runtime/git-rebase/hook.sh ]; then
+ runtime/git-rebase/hook.sh post-run $total_loops || break
+ fi
} 2>&1 | tee "runtime/git-rebase/logs/$hash.log"
git rebase --continue || break
git_rebase_runner_success=1
done
+ if [ -e runtime/git-rebase/hook.sh ]; then
+ runtime/git-rebase/hook.sh stop $total_loops || break
+ fi
# POSIX [ doesn't deal well when one of the arguments is empty; this
# could occur if $total_loops = 0.
if [ "z$git_rebase_runner_success" = "z0" ]; then