]> rtime.felk.cvut.cz Git - frescor/frsh.git/commitdiff
fcb: Parse command line parameters in wrapper script
authorMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Feb 2011 11:32:21 +0000 (12:32 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Tue, 22 Feb 2011 11:32:21 +0000 (12:32 +0100)
This is needed for -d to be passed to forbrun instead to libfcb.so.

fres/cbroker/fcb

index c6ca43249d42c2069597618a0a73d5a47db80519..36976e4f5aa6d36c90cb9721df1bcd1437d8ab8c 100755 (executable)
@@ -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