X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=config.sh;fp=config.sh;h=9e4a5113d8fe327758215a418b2756a1f99ed6e4;hb=438157bbee75d04c3737ec50ce1953e9fde8607a;hp=0000000000000000000000000000000000000000;hpb=676d468ad2d34eba5def482ef14158313d1bbaa5;p=modules%2Fshaper.git diff --git a/config.sh b/config.sh new file mode 100755 index 000000000..9e4a5113d --- /dev/null +++ b/config.sh @@ -0,0 +1,40 @@ +#!/bin/bash -ex + +rm env_config.sh || echo "File env_config.sh was not found." + +echo "#!/bin/bash -ex" >> env_config.sh + +PLATFORM="" +if [ -f PLATFORM ]; then +PLATFORM="$(lsb_release -is)" +RELEASE="$(lsb_release -rs)" +if [ "${PLATFORM}" = 'CentOS' ]; then PLATFORM=-centos +elif [ "${PLATFORM}" = 'Debian' ]; then + if [ "${RELEASE}" = '8.0' ]; then PLATFORM=-d8 + else PLATFORM=-d6 + fi +fi +fi +echo "export PLATFORM=${PLATFORM}" >> env_config.sh + +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 + else + echo "Could not find SALOME for the platform ${platform} ${release}" + exit 1 + fi + fi +} +main +echo "export INST_ROOT=${INST_ROOT}" >> env_config.sh +