Salome HOME
Fix regression in ParaView installation script: invalid path to the patch
[tools/install.git] / config_files / start_salome.sh
1 #!/bin/bash -noprofile
2
3 ####################################################################################
4 #  File      : start_salome.sh
5 #  Created   : Tue Oct 30 11:15:35 2006
6 #  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
7 #  Project   : SALOME
8 #  Module    : Installation Wizard
9 #  Copyright : 2002-2014 CEA
10 #
11 #  This script is the part of the SALOME installation procedure.
12 #
13 ####################################################################################
14
15 # This procedure checks if the SALOME desktop can be run.
16 # Returns 0 in success and 1 if any error occurs.
17 check_enabled()
18 {
19     if [ -f ${INST_ROOT}/env_products.sh ] ; then
20         source ${INST_ROOT}/env_products.sh
21     fi
22     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ "${GUI_ROOT_DIR}" != "" ] && 
23         [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
24         return 0;
25     fi
26     return 1;
27 }
28
29 # This procedure is used to launch SALOME.
30 # Returns 0 in success and 1 if any error occurs.
31 execute()
32 {
33     if [ -f ${INST_ROOT}/env_products.sh ] ; then
34         source ${INST_ROOT}/env_products.sh
35     fi
36     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ "${GUI_ROOT_DIR}" != "" ] && 
37         [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
38         env SALOME_TEST_MODE=1 runSalome >& /dev/null
39         if [ "$?" = "0" ] ; then
40             return 0;
41         fi
42     fi
43     return 1;
44 }
45
46 # Set general usage variables from the command line parameters:
47 #     $0 is the path to this script itself
48 #     $1 is the name of the procedure to be run
49 #     $2 is the installation directory path
50 #     $3 is the temporary directory path
51 SCRIPT_DIR=`dirname $0`
52 PROCEDURE=$1;
53 INST_ROOT=$2;
54 INSTALL_WORK=$3;
55
56 # Run the procedure
57 ${PROCEDURE}