summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-03 22:17:00 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-03 22:17:00 +0100
commit6835292c015be39be8338e1c178513ea9f8dfd60 (patch)
tree4adf3a018ab1decbb22c444ffe3e8690d5b43c92 /src
parent83eef977a27c2216ea8c9a42ab17e8f18677a4c7 (diff)
allow passing of parameters for workers/phases
Diffstat (limited to 'src')
-rwxr-xr-xsrc/fifa.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/fifa.sh b/src/fifa.sh
index b065b09..795cd15 100755
--- a/src/fifa.sh
+++ b/src/fifa.sh
@@ -105,14 +105,16 @@ execute ()
[ "$1" != phase -a "$1" != worker ] && die_error "execute's first argument must be a valid type (phase/worker)"
[ "$1" = phase ] && log "******* Executing phase $2"
[ "$1" = worker ] && log "*** Executing worker $2"
- if type -t $1_$2 | grep -q function
+ to_execute=$1_$2
+ shift 2
+ if type -t $to_execute | grep -q function
then
PWD_BACKUP=`pwd`
- $1_$2
+ $to_execute "$@"
ret=$?
cd $PWD_BACKUP
else
- die_error "$1 $2 is not defined!"
+ die_error "$to_execute is not defined!"
fi
return $ret