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 OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
25 # --- set environment variables for port and hostname of NamingService
27 NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
29 NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
33 # --- invoque shell with or without args
35 if [ $# -ne 0 ] ; then
36 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
39 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc