3 # Copyright (C) 2011-2013 EDF R&D
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 # This script creates a source file that defines a SALOME shell
23 # environment. We assume here that the SALOME environment has been
24 # previously set, so that the env command get all environment
25 # variables required for building and executing SALOME. We talk
26 # about third party software programs and libraries. The environment
27 # variables defining SALOME module are exluded (i.e. *_ROOT_DIR)
28 # because they are automatically set when generating a SALOME application..
30 # The argument is the filepath to be created.
36 ENVAPPLI_SH=envappli.sh
41 echo "# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
42 echo "# THIS FILE IS GENERATED from the shell environment used to build the SALOME module."
43 echo "# IT SHOULD NOT BE EDITED, it is generated for the need of the SALOME application "
44 echo "# that embeds the module (for test purposes). "
45 echo "# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
49 env | grep -v -e PWD -e SalomeAppConfig -e _ROOT_DIR | while read f; do
50 key=$(echo $f | cut -d"=" -f1)
51 value=$(echo $f | cut -d"=" -f2-)
53 # if the key is a path (LD_LIBRARY_PATH, PATH and PYTHONPATH) then
54 # we must extends the variable.
55 if [ $key == "LD_LIBRARY_PATH" -o $key == "PATH" -o $key == "PYTHONPATH" ]; then
56 echo export $key=\"$value:\$$key\"
58 echo export $key=\"$value\"