Salome HOME
update copyright notes (2007)
[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-2007 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 ${INSTALL_ROOT}/env_products.sh ] ; then
20         source ${INSTALL_ROOT}/env_products.sh
21     fi
22     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
23         return 0;
24     fi
25     return 1;
26 }
27
28 # This procedure is used to launch SALOME.
29 # Returns 0 in success and 1 if any error occurs.
30 execute()
31 {
32     if [ -f ${INSTALL_ROOT}/env_products.sh ] ; then
33         source ${INSTALL_ROOT}/env_products.sh
34     fi
35     if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
36         runSalome >& /dev/null
37         if [ "$?" == "0" ] ; then
38             return 0;
39         fi
40     fi
41     return 1;
42 }
43
44 # Set general usage variables from the command line parameters:
45 #     $0 is the path to this script itself
46 #     $1 is the name of the procedure to be run
47 #     $2 is the installation directory path
48 #     $3 is the temporary directory path
49 SCRIPT_DIR=`dirname $0`
50 PROCEDURE=$1;
51 INSTALL_ROOT=$2;
52 INSTALL_WORK=$3;
53
54 # Run the procedure
55 $PROCEDURE