X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=salome_env.sh;h=ae918e290996a36059a3b53cd44be2b3f618c513;hb=bc040d7778dfca67e24a0452ce41f88417799adb;hp=83ce4e2e66f793a9662b0e7db785257051eb228f;hpb=7ea67ebcfb3123f3a99f7eca666a887d1cc4a340;p=modules%2Fshaper.git diff --git a/salome_env.sh b/salome_env.sh index 83ce4e2e6..ae918e290 100644 --- a/salome_env.sh +++ b/salome_env.sh @@ -1,25 +1,19 @@ -#!/bin/sh +#!/bin/bash -if [ "${INST_ROOT}" = "" ] ; then - source /dn47/SALOME/PRODUCTS/7x/opt/CentOS.6.3.64/7.3.0/env_products.sh - source /dn47/SALOME/stable/V7_3_0/start.sh -else - source ${INST_ROOT}/env_products.sh -fi +main() { + local salome_version=7.6.0 + local platform="$(lsb_release -is)" + local release="$(lsb_release -rs)" + if [[ ${salome_version} == "7.5.1" ]]; then + if [[ "${platform}" == "CentOS" ]]; then export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3 + elif [[ "${platform}" == "Debian" && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES + elif [[ "${platform}" == "Debian" && ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES + fi + elif [[ ${salome_version} == "7.6.0" ]]; then + if [[ "${platform}" == "CentOS" ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_CentOS-6.3_SOURCES + elif [[ "${platform}" == "Debian" && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_Debian-6.0_SOURCES + fi + fi +} - -export ROOT_DIR=$(pwd)/.. -export ROOT_DIR=`cd "${ROOT_DIR}";pwd` - -SRC_DIR=${ROOT_DIR}/sources - -export LIB=${LD_LIBRARY_PATH} -export PATH=${CASROOT}:${PATH} -export PYTHON_INC_DIR=${PYTHON_INCLUDE} -export PYTHON_LIB_DIR=${PYTHON_ROOT_DIR}/lib - -#------ NewGEOM ------ -export INST_DIR=${ROOT_DIR}/install -export PATH=${INST_DIR}/bin:${INST_DIR}/plugins:${PATH} -export LD_LIBRARY_PATH=${INST_DIR}/bin:${INST_DIR}/swig:${INST_DIR}/plugins:${PATH}${LD_LIBRARY_PATH} -export NEW_GEOM_CONFIG_FILE=${INST_DIR}/plugins +main