91189c2005-07-25Fredrik Noring #!/bin/sh #
84aee52015-10-23Henrik Grubbström (Grubba) # $Id$
91189c2005-07-25Fredrik Noring 
d753c92005-12-21Fredrik Noring ROXEN_DIR=@ROXEN_DIR@
91189c2005-07-25Fredrik Noring  parse_args() { while [ ! c"$1" = "c" ] do case "$1" in --config-dir=*)
d753c92005-12-21Fredrik Noring  ROXEN_CONFIGDIR=`echo "$1" | sed -e 's/--config-dir=//'`
91189c2005-07-25Fredrik Noring  ;; esac case "$1" in --roxen-dir=*) ROXEN_DIR=`echo "$1" | sed -e 's/--roxen-dir=//'` ;; esac shift done } if [ ! c"$ROXEN_ARGS" = "c" ] then parse_args $ROXEN_ARGS fi parse_args "$@"
d753c92005-12-21Fredrik Noring if [ x"$ROXEN_CONFIGDIR" = x ]
91189c2005-07-25Fredrik Noring then
d753c92005-12-21Fredrik Noring  ROXEN_DATADIR="`pwd`" ROXEN_LOGDIR="$ROXEN_DATADIR"/logs ROXEN_CONFIGDIR="$ROXEN_DATADIR"/configurations export ROXEN_DATADIR ROXEN_LOGDIR ROXEN_CONFIGDIR
91189c2005-07-25Fredrik Noring fi
d753c92005-12-21Fredrik Noring if [ ! -d "$ROXEN_CONFIGDIR" ]
91189c2005-07-25Fredrik Noring then echo "No configuration found. Use --config-dir=<config dir>" exit 1 fi
d753c92005-12-21Fredrik Noring if [ -f "$ROXEN_CONFIGDIR"/_environment ]
91189c2005-07-25Fredrik Noring then
d753c92005-12-21Fredrik Noring  . "$ROXEN_CONFIGDIR"/_environment
91189c2005-07-25Fredrik Noring fi cd "$ROXEN_DIR" && exec ./start "$@"