From: akl Date: Wed, 18 Jun 2008 14:37:26 +0000 (+0000) Subject: Provide global variables with the current SALOME version and a single directory name... X-Git-Tag: before_merging_with_4X~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2b4630f37d801b14f4bab379f0fd20cb089e50b2;p=tools%2Finstall.git Provide global variables with the current SALOME version and a single directory name for SALOME modules. --- diff --git a/config_files/common.sh b/config_files/common.sh index e996ab7..8763e9c 100755 --- a/config_files/common.sh +++ b/config_files/common.sh @@ -6,7 +6,7 @@ # Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com) # Project : SALOME # Module : Installation Wizard -# Copyright : 2002-2007 CEA +# Copyright : 2002-2008 CEA # # This script is the part of the SALOME installation procedure. # @@ -16,14 +16,17 @@ export DELIM="------" export SHRC="salome.sh" export CSHRC="salome.csh" +##################################################### +# !WARNING! This is current SALOME version number +#################################################### +export SALOME_VERSION="4.1.3" -#this function takes several parameters -#first parameter contains path to module source filder -#second parameters is value of $VERSION variables form MODULE.sh file +# Name of the single directory for SALOME modules +export SDIR_NAME="SALOME_${SALOME_VERSION}" +#this function takes one parameter - path to module source folder check_salome_src_version(){ root_dir=`printenv $1` -module_version=$2 if [ -n "$root_dir" ]; then cfg_file=configure.ac @@ -32,7 +35,7 @@ if [ -n "$root_dir" ]; then fi if [ -f ${root_dir}/${cfg_file} ] ; then ver=`grep -e "^AC_INIT" ${root_dir}/${cfg_file} | sed -e "s%.*\[\([[:digit:].]*\)\].*%\1%g"` - if [ "$ver" = "${module_version}" ]; then + if [ "$ver" = "${SALOME_VERSION}" ]; then return 0 fi fi diff --git a/config_files/modifyLaFiles.sh b/config_files/modifyLaFiles.sh index 04d066c..93b4ce2 100755 --- a/config_files/modifyLaFiles.sh +++ b/config_files/modifyLaFiles.sh @@ -16,14 +16,13 @@ modify_la_files(){ -modif_la_files ${INST_DIR}/$SINGLE_PATH +modif_la_files ${INST_DIR}/$SDIR_NAME test $? -eq 0 && exit 1 || exit 0 } PROCEDURE=$1 INST_DIR=$2 -SINGLE_PATH=$3 source ${INST_DIR}/env_products.sh source ./common.sh