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