1#!/bin/bash 2dir=`dirname $0` 3scripts=() 4configs=() 5dirs=() 6working=t 7while [ $working = t ]; do 8 if [ "$1" = "end" -o "$1" = "--" -o "$1" = "" ]; then 9 shift 10 working=f 11 else 12 scripts+=($1) 13 shift 14 configs+=($1) 15 shift 16 dirs+=($1) 17 shift 18 fi 19done 20for i in ${!scripts[@]}; do 21 "$dir"/"${scripts[$i]}" "${configs[$i]}" "${dirs[$i]}" "$@" || exit 1 22done 23