Salome HOME
SALOME 6.5.0 preparation: homard 10.3 -> 10.4
[tools/install.git] / config_files / start_salome.sh
index 80ae1e5bffb67355b530f80dc3798819553b7cb2..be007de80db8844d93e6cfa7884bf399cd6126b0 100755 (executable)
@@ -1,21 +1,26 @@
-#!/bin/sh 
+#!/bin/bash -noprofile
 
 ####################################################################################
-# 
-# The script is the part of the SALOME installation procedure.
-# This script is used to launch SALOME desktop.
+#  File      : start_salome.sh
+#  Created   : Tue Oct 30 11:15:35 2006
+#  Author    : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
+#  Project   : SALOME
+#  Module    : Installation Wizard
+#  Copyright : 2002-2008 CEA
+#
+#  This script is the part of the SALOME installation procedure.
 #
-# Copyright : 2006 CEA/DEN, EDF R&D
 ####################################################################################
 
 # This procedure checks if the SALOME desktop can be run.
 # Returns 0 in success and 1 if any error occurs.
 check_enabled()
 {
-    if [ -f ${INSTALL_ROOT}/env_products.sh ] ; then
-       source ${INSTALL_ROOT}/env_products.sh
+    if [ -f ${INST_ROOT}/env_products.sh ] ; then
+       source ${INST_ROOT}/env_products.sh
     fi
-    if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
+    if [ "${KERNEL_ROOT_DIR}" != "" ] && [ "${GUI_ROOT_DIR}" != "" ] && 
+       [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
        return 0;
     fi
     return 1;
@@ -25,10 +30,11 @@ check_enabled()
 # Returns 0 in success and 1 if any error occurs.
 execute()
 {
-    if [ -f ${INSTALL_ROOT}/env_products.sh ] ; then
-       source ${INSTALL_ROOT}/env_products.sh
+    if [ -f ${INST_ROOT}/env_products.sh ] ; then
+       source ${INST_ROOT}/env_products.sh
     fi
-    if [ "${KERNEL_ROOT_DIR}" != "" ] && [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
+    if [ "${KERNEL_ROOT_DIR}" != "" ] && [ "${GUI_ROOT_DIR}" != "" ] && 
+       [ -f ${KERNEL_ROOT_DIR}/bin/salome/runSalome ] ; then
        runSalome >& /dev/null
        if [ "$?" == "0" ] ; then
            return 0;
@@ -44,7 +50,7 @@ execute()
 #     $3 is the temporary directory path
 SCRIPT_DIR=`dirname $0`
 PROCEDURE=$1;
-INSTALL_ROOT=$2;
+INST_ROOT=$2;
 INSTALL_WORK=$3;
 
 # Run the procedure