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 . ${APPLI_HOME}/setAppliPath.sh
14 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
16 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
18 # --- set omniORB configuration to current session if any
21 fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
23 if [ -f $fileOmniConfig ]; then
24 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
27 # --- set environment variables for port and hostname of NamingService
29 NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
31 NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
35 # --- invoke shell with or without args
37 if [ $# -ne 0 ] ; then
38 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py $*
41 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc