Salome HOME
5984410f1559f4ca1ab2cdc8c47478241e860ef3
[modules/shaper.git] / salome_run.sh
1 #!/bin/bash
2
3 source env.sh
4 source ${TOOLS_DIR}/env_salome.sh
5
6 # kill processes of previous SALOME run
7 if [ -f .salomeport ]; then
8   SALOME_PORT=$(cat .salomeport)
9   ${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT}
10   pkill -f "omniNames -start ${SALOME_PORT}"
11   rm .salomeport
12 fi 
13
14 SALOME_ARGS=""
15 if [[ "${SALOME_SQUISH_PREFS:-FALSE}" == "TRUE" ]]; then
16   SALOME_ARGS="${SALOME_ARGS} -r ${SOURCES_DIR}/test.squish/shared/testdata/SalomeApp.xml"
17 fi
18 SALOME_ARGS="${SALOME_ARGS} --ns-port-log=$(pwd)/.salomeport"
19
20 ${KERNEL_ROOT_DIR}/bin/salome/runSalome.py ${SALOME_ARGS} >log_runSalome 2>err_runSalome
21
22 SALOME_PORT=$(cat .salomeport)
23 echo "Kill SALOME on port ${SALOME_PORT}"
24 ${KERNEL_ROOT_DIR}/bin/salome/killSalomeWithPort.py ${SALOME_PORT}
25 pkill -f "omniNames -start ${SALOME_PORT}"
26