]> SALOME platform Git repositories - modules/shaper.git/blob - config.sh
Salome HOME
9e4a5113d8fe327758215a418b2756a1f99ed6e4
[modules/shaper.git] / config.sh
1 #!/bin/bash -ex
2
3 rm env_config.sh || echo "File env_config.sh was not found."
4
5 echo "#!/bin/bash -ex" >> env_config.sh
6
7 PLATFORM=""
8 if [ -f PLATFORM ]; then
9 PLATFORM="$(lsb_release -is)"
10 RELEASE="$(lsb_release -rs)"
11 if [ "${PLATFORM}" = 'CentOS' ]; then PLATFORM=-centos
12 elif [ "${PLATFORM}" = 'Debian' ]; then
13   if [ "${RELEASE}" = '8.0' ]; then PLATFORM=-d8
14   else PLATFORM=-d6
15   fi
16 fi
17 fi
18 echo "export PLATFORM=${PLATFORM}" >> env_config.sh
19
20 main() {
21   local salome_version='7.6.0'
22   local platform="$(lsb_release -is)"
23   local release="$(lsb_release -rs)"
24   if [[ ${salome_version} = '7.5.1' ]]; then
25     if   [[ "${platform}" = 'CentOS' ]]; then export INST_ROOT=/dn48/newgeom/common/SALOME-7.5.1_CentOS-6.3
26     elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-6.0_SOURCES
27     elif [[ "${platform}" = 'Debian' && ${release} =~ ^8 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.5.1_Debian-8.0_SOURCES
28     fi
29   elif [[ ${salome_version} = '7.6.0' ]]; then
30     if   [[ "${platform}" = 'CentOS' ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_CentOS-6.3_SOURCES
31     elif [[ "${platform}" = 'Debian' && ${release} =~ ^6 ]]; then export INST_ROOT=/dn23/NEWGEOM/common/SALOME-7.6.0_Debian-6.0_SOURCES
32     else 
33       echo "Could not find SALOME for the platform ${platform} ${release}"
34       exit 1
35     fi
36   fi
37 }
38 main
39 echo "export INST_ROOT=${INST_ROOT}" >> env_config.sh
40