From: Michal Sojka Date: Tue, 22 Feb 2011 11:32:21 +0000 (+0100) Subject: fcb: Parse command line parameters in wrapper script X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/frsh.git/commitdiff_plain/891a63080ee425f8318c4091dd8314fc883cd483?hp=801d4a7e9924a5fde3fc2fd8fd0ff6483b6a9c29 fcb: Parse command line parameters in wrapper script This is needed for -d to be passed to forbrun instead to libfcb.so. --- diff --git a/fres/cbroker/fcb b/fres/cbroker/fcb index c6ca432..36976e4 100755 --- a/fres/cbroker/fcb +++ b/fres/cbroker/fcb @@ -1,3 +1,15 @@ #!/bin/sh -forbrun -i "org.frescor.fcb" -- libfcb.so "$@" +while [ $# -gt 0 ]; do + case "$1" in + -d*|--daemon=) + FORBRUN_ARGS="$FORBRUN_ARGS $1";; + --daemon) + FORBRUN_ARGS="$FORBRUN_ARGS $1 $2"; shift;; + *) + FCB_ARGS="$FCB_ARGS '$1'" + esac + shift +done + +forbrun -i "org.frescor.fcb" $FORBRUN_ARGS -- libfcb.so $FCB_ARGS