3 # --- run command in SALOME environment from remote call, ssh or rsh
4 # - SALOME configuration is defined by :
5 # - list of MODULE_ROOT_DIR
6 # - prerequisite environment
7 # - specific configuration for a particular SALOME application
8 # - These elements of configuration are defined locally on each computer
9 # in the directory APPLI:
10 # - A SALOME application distributed on several computers needs APPLI
11 # directories on the same path ($APPLI) relative to $HOME directory
12 # of the user, on each computer.
14 # --- call example (from cli76cd to cli76ce):
15 # ssh cli76ce ${APPLI}/runRemote.sh cli76cd 2810 SALOME_Container myContainerName
18 # $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
19 # $1 : computer name for CORBA name service (where SALOME was launched)
20 # $2 : port for CORBA name service
21 # $3 and following : local command to execute, with args
24 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
26 . `dirname $0`/setAppliPath.sh
28 # --- set the SALOME environment (prerequisites, MODULES_ROOT_DIR...)
30 . ${HOME}/${APPLI}/envd ${HOME}/${APPLI}
32 # --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
34 export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
37 initref="NameService=corbaname::"$1":$2"
38 echo "ORBInitRef $initref" > $OMNIORB_CONFIG
40 # --- execute the command in the SALOME environment
44 ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*"