#!/bin/sh
-forbrun -i "org.frescor.frm.cluster_tree" -- libfrm_cluster_tree.so "$@"
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -d*|--daemon=)
+ FORBRUN_ARGS="$FORBRUN_ARGS $1";;
+ --daemon)
+ FORBRUN_ARGS="$FORBRUN_ARGS $1 $2"; shift;;
+ *)
+ FRM_ARGS="$FRM_ARGS $1"
+ esac
+ shift
+done
+
+forbrun -i "org.frescor.frm.cluster_tree" $FORBRUN_ARGS -- libfrm_cluster_tree.so $FRM_ARGS