]> SALOME platform Git repositories - tools/install.git/blob - config_files/start_salome.sh
Salome HOME
80ae1e5bffb67355b530f80dc3798819553b7cb2
[tools/install.git] / config_files / start_salome.sh
1 #!/bin/sh 
2
3 ####################################################################################
4
5 # The script is the part of the SALOME installation procedure.
6 # This script is used to launch SALOME desktop.
7 #
8 # Copyright : 2006 CEA/DEN, EDF R&D
9 ####################################################################################
10
11 # This procedure checks if the SALOME desktop can be run.
12 # Returns 0 in success and 1 if any error occurs.
13 check_enabled()
14 {
15     if [ -f ${INSTALL_ROOT}/env_products.sh ] ; then
16         source ${INSTALL_ROOT}/env_products.sh
17     fi
18     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
19         return 0;
20     fi
21     return 1;
22 }
23
24 # This procedure is used to launch SALOME.
25 # Returns 0 in success and 1 if any error occurs.
26 execute()
27 {
28     if [ -f ${INSTALL_ROOT}/env_products.sh ] ; then
29         source ${INSTALL_ROOT}/env_products.sh
30     fi
31     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
32         runSalome >& /dev/null
33         if [ "$?" == "0" ] ; then
34             return 0;
35         fi
36     fi
37     return 1;
38 }
39
40 # Set general usage variables from the command line parameters:
41 #     $0 is the path to this script itself
42 #     $1 is the name of the procedure to be run
43 #     $2 is the installation directory path
44 #     $3 is the temporary directory path
45 SCRIPT_DIR=`dirname $0`
46 PROCEDURE=$1;
47 INSTALL_ROOT=$2;
48 INSTALL_WORK=$3;
49
50 # Run the procedure
51 $PROCEDURE