3 # Useful shell to run executable progs or shells under Salome env
4 # Use it with args to run a program : runSession python -i myprog.py
5 # Use it without args to run an interactive shell under Salome env
8 APPLI_HOME=`dirname $0`
10 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
12 export APPLI=`${APPLI_HOME}/getAppliPath.py`
14 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
16 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
18 # --- set omniORB configuration to current session if any
20 fileOmniConfig=${HOME}/${APPLI}/.omniORB_last.cfg
22 if [ -f $fileOmniConfig ]; then
23 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_last.cfg
26 # --- set environment variables for port and hostname of NamingService
28 NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
30 NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
34 # --- invoke shell with or without args
36 if [ $# -ne 0 ] ; then
37 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py $*
40 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc