#!/bin/bash
-
exec 3>&1 4>&2
trap 'exec 2>&4 1>&3' 0 1 2 3
-exec 1>~/salome_siman_log.out 2>&1
-# all script actions below are logged to the file '~/salome_siman_log.out':
+exec 1>${HOME}/siman_salome_log.out 2>&1
-echo "the script execution is logged to the log file ~/salome_siman_log.out" >&3
+echo "the script execution is logged to the log file ${HOME}/siman_salome_log.out" >&3
echo "parameters 1: $1 $2 $3"
-echo "$#"
+echo "number of parameters = $#"
if [ "$#" -ne 3 ] ; then
echo "Usage :
exit
fi
-echo "pwd = " ${PWD}
-echo "display = " ${DISPLAY}
-
if [ -z "${SALOME_ROOT_DIR}" ]; then
echo "You need to set the environment variable SALOME_ROOT_DIR" >&3
exit 1
fi
+echo
echo "SALOME_ROOT_DIR = " ${SALOME_ROOT_DIR}
env_script=${SALOME_ROOT_DIR}/env_products.sh
echo 'Proceed with the current environment.'
fi
-echo "parameters 2"
-
castem_env_script=${SALOME_ROOT_DIR}/castem_env_products.sh
if [ -e $castem_env_script ] ; then
echo "CASTEM_ROOT_DIR = " $CASTEM_ROOT_DIR
+echo
echo ">>> Setting SALOME-SIMAN environment"
export WSFCPP_HOME=${SALOME_ROOT_DIR}/wso2-wsf-cpp-2.1.0
-#export PATH=${WSFCPP_HOME}/lib:${PATH}
export LD_LIBRARY_PATH=${WSFCPP_HOME}/lib:${LD_LIBRARY_PATH}
echo "WSFCPP_HOME = " ${WSFCPP_HOME}
export LD_LIBRARY_PATH=${SIMANIO_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
export SIMAN_WS_HOST="172.22.0.102:8080"
+echo "SIMAN_WS_HOST = ${SIMAN_WS_HOST}"
+
+export SimanSalome_DIR="/tmp/SimanSalome/${1##*=}/${2##*=}/${3##*=}/"
-echo "parameters 3"
+mkdir -p ${SimanSalome_DIR}
+chmod -Rf g+w /tmp/SimanSalome
-export SIMAN_DATA_TMP="/tmp/SimanSalome/${1##*=}/${2##*=}/${3##*=}/"
-mkdir -p ${SIMAN_DATA_TMP}
-chmod -R g+w /tmp/SimanSalome
-cd $SIMAN_DATA_TMP
-echo SIMAN_DATA_TMP = $SIMAN_DATA_TMP
+echo
+echo "SimanSalome_DIR = ${SimanSalome_DIR}"
-echo ">>> SALOME-SIMAN running"
+cd ${SimanSalome_DIR}
-echo "parameters 4"
+echo
+echo "pwd = " `pwd`
+echo "display = " ${DISPLAY}
+
+echo
+echo ">>> SALOME-SIMAN running"
#modules="KERNEL,GEOM,MED,SMESH,VISU,PARAVIS,YACS,CASTEM"
-modules="KERNEL,GEOM,MED,SMESH,VISU,YACS,CASTEM"
+modules="KERNEL,GEOM,MED,SMESH,CASTEM,VISU,YACS"
+
+export NOT_INTERCEPT_SIGNALS=1
#runSalome --siman $1 $2 $3 -k
runSalome --siman $1 $2 $3 -k --modules=$modules
fi
rm -rf "/tmp/SimanSalome/${1##*=}/${2##*=}"
+rm -rf ${SalomeWorking_DIR}
+
+echo
+cd -
+echo
+echo = = = = =