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 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
10 . `dirname $0`/setAppliPath.sh
12 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
14 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
16 # --- set omniORB configuration to current session if any
19 fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
21 if [ -f $fileOmniConfig ]; then
22 export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
24 # --- set environment variables for port and hostname of NamingService
26 export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
27 export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
30 # --- invoque shell with or without args
32 if [ $# -ne 0 ] ; then
33 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
36 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc