#!/bin/sh
export OPENMODELICAHOME=${HOME}/OpenModelica/share/openmodelica-1.4-dev/
export OPENMODELICALIBRARY=${OPENMODELICAHOME}/modelica-2.2
export PATH=.:${PATH}
export LD_LIBRARY_PATH=${HOME}/OpenModelica/lib/mico-openmodelica-1.4-dev:${LD_LIBRARY_PATH}

cd ${HOME}/OpenModelica/work
# check if verbose flag is set
if [ ! -z $1 ] && [ $1 == -verbose ]; then
  # start child process (omc)
  ( ${OPENMODELICAHOME}/bin/omc +d=interactiveCorba; ) &
  ${OPENMODELICAHOME}/bin/OMShell -noserv
else
  ${OPENMODELICAHOME}/bin/OMShell $*
fi