]> SALOME platform Git repositories - tools/install.git/commitdiff
Salome HOME
Fix PAL7001:
authorvsr <vsr@opencascade.com>
Tue, 16 Nov 2004 09:30:33 +0000 (09:30 +0000)
committervsr <vsr@opencascade.com>
Tue, 16 Nov 2004 09:30:33 +0000 (09:30 +0000)
- modify salome.(c)sh and env_products.(c)sh: add commands to clean duplication from the environment variables (PATH, LD_LIBRARY_PATH, PYTHONPATH, LD_RUN_PATH) and use these commands to process environment where it is needed;
- exclude non-existing directories from environment variables.

config_files/COMPONENT_BIN_2.1.0.sh
config_files/GEOM_BIN_2.1.0.sh
config_files/GHS3DPLUGIN_BIN_2.1.0.sh
config_files/KERNEL_BIN_2.1.0.sh
config_files/MED_BIN_2.1.0.sh
config_files/NETGENPLUGIN_BIN_2.1.0.sh
config_files/PYCALCULATOR_BIN_2.1.0.sh
config_files/SMESH_BIN_2.1.0.sh
config_files/SUPERV_BIN_2.1.0.sh
config_files/VISU_BIN_2.1.0.sh
config_files/common.sh

index 77b67809fc7152ca3a64f4756d7680b995b9d986..63375d678772b09be23974170559ca9badb811ea 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export COMPONENT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${COMPONENT_ROOT_DIR}/lib/salome:\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome:\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export COMPONENT_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${COMPONENT_ROOT_DIR}/bin/salome:\${COMPONENT_ROOT_DIR}/lib/salome:\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome:\${COMPONENT_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index db82a2fc1e5cae6c5fdc538287d95f576d38f31c..2a42713bcef5901bc181aa78a2e129b80a0c7bec 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export GEOM_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${GEOM_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${GEOM_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${GEOM_ROOT_DIR}/lib/salome:\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome:\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export GEOM_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${GEOM_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${GEOM_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${GEOM_ROOT_DIR}/bin/salome:\${GEOM_ROOT_DIR}/lib/salome:\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome:\${GEOM_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 62753e45536a11c050b92fb62113574b8248db6f..eebc338d56f40b83188c8d30eed440da513c3391 100755 (executable)
@@ -18,12 +18,8 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GHS3DPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${GHS3DPLUGIN_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -37,12 +33,8 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export GHS3DPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${GHS3DPLUGIN_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${GHS3DPLUGIN_ROOT_DIR}/lib/salome:\${GHS3DPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index e2446ce0a74cad1a5c6fdc6441cc160d3c9da15e..764a5c3d7df852095b338f405cd7e73d1dd2ea58 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export KERNEL_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export KERNEL_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${KERNEL_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${KERNEL_ROOT_DIR}/bin/salome:\${KERNEL_ROOT_DIR}/lib/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome:\${KERNEL_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index a5e928c2b55224d34308c6458b62b36bec133b40..4bf697ade23dfef9672c65ff656c0572ca8240ee 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export MED_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${MED_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${MED_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${MED_ROOT_DIR}/lib/salome:\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome:\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export MED_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${MED_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${MED_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${MED_ROOT_DIR}/bin/salome:\${MED_ROOT_DIR}/lib/salome:\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome:\${MED_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 92a35dc08e4d96a5895c0f7d05918be6be5aa87d..0cafd58895f094c00ae6d66833c798d15cb1513f 100755 (executable)
@@ -18,12 +18,8 @@ print_env(){
 cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export NETGENPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${NETGENPLUGIN_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -37,12 +33,8 @@ if [ $? -eq 0 ] ; then
     cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF 
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export NETGENPLUGIN_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
-export PATH=\${NETGENPLUGIN_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${NETGENPLUGIN_ROOT_DIR}/lib/salome:\${NETGENPLUGIN_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 450778b3ad9b1b648a32190ba65d5448b5f795bc..b6e905daa804e150723f67209a4da09300ae5c73 100755 (executable)
@@ -18,11 +18,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
-export LD_LIBRARY_PATH=\${PYCALCULATOR_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -37,11 +33,7 @@ if [ $? -eq 0 ] ; then
 #$DELIM ${PRODUCT_TYPE} $DELIM
 export PYCALCULATOR_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PATH}
-export LD_LIBRARY_PATH=\${PYCALCULATOR_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${PYCALCULATOR_ROOT_DIR}/bin/salome:\${PYCALCULATOR_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index c2c9b920ec3d9a3786dbc18f5f2799c47f2b0551..d0260acf22713bd9559fa6cc4edbc142ab6e5c43 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export SMESH_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${SMESH_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${SMESH_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${SMESH_ROOT_DIR}/lib/salome:\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome:\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export SMESH_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${SMESH_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${SMESH_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${SMESH_ROOT_DIR}/bin/salome:\${SMESH_ROOT_DIR}/lib/salome:\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome:\${SMESH_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 2de2249b901c04ff2492d9e753bd9f575af4d71d..ca89c67f4bcc828bae275e4a7db41ea9afdd4455 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export SUPERV_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${SUPERV_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${SUPERV_ROOT_DIR}/lib/salome:\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome:\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export SUPERV_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${SUPERV_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${SUPERV_ROOT_DIR}/bin/salome:\${SUPERV_ROOT_DIR}/lib/salome:\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome:\${SUPERV_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 005691e6cb20a74c96f143bcf11ab2b121b1a5ea..63d382dfff9276de69832ed27cd8c92774aa3b0d 100755 (executable)
@@ -19,10 +19,7 @@ cat > ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh <<EOF
 export VISU_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${VISU_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${VISU_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${VISU_ROOT_DIR}/lib/salome:\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome:\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
 (test -w ${PRODUCT_DIR} && cp ${INSTALL_WORK}/env_${PRODUCT_TYPE}.sh ${PRODUCT_DIR})
@@ -38,10 +35,7 @@ if [ $? -eq 0 ] ; then
 export VISU_ROOT_DIR=\${INSTALL_ROOT}/${PRODUCT}
 export PATH=\${VISU_ROOT_DIR}/bin/salome:\${PATH}
 export LD_LIBRARY_PATH=\${VISU_ROOT_DIR}/lib/salome:\${LD_LIBRARY_PATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome:\${PYTHONPATH}
-export PYTHONPATH=\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
+export PYTHONPATH=\${VISU_ROOT_DIR}/bin/salome:\${VISU_ROOT_DIR}/lib/salome:\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome:\${VISU_ROOT_DIR}/lib/python2.2/site-packages/salome/shared_modules:\${PYTHONPATH}
 ##
 EOF
     make_env ${INSTALL_ROOT} ${INSTALL_WORK} "${PRODUCT_SEQUENCE}"
index 2d5415aba6efd9b902104ab9afa18097609c6209..feca5a1578c77908144eb77c2067dd6a5ec3d948 100755 (executable)
@@ -88,27 +88,56 @@ if [ $# -eq 3 ] ; then
     product_env=${install_work}/env_${product_name}.sh
     (test -e ${product_env} && rm ${product_env} )
 fi
-
+### !!! writing salome.sh file !!! -> add global functions
 cat >> ${install_work}/$SHRC <<EOF
 export INSTALL_ROOT=${install_root}
+#$DELIM globals $DELIM
+setenvp() {
+    xenv=\$2:\`printenv \$1\`
+    out_var=\`echo \$xenv | awk -F: '{n=0 ; for(i=1;i<=NF;i++){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=0;j<n;j++){printf "%s",keys[j];if(j<n-1) printf ":"} ; printf "\n"}'\`
+    export \$1=\$out_var
+}
+
+setenva() {
+    xenv=\`printenv \$1\`:\$2
+    out_var=\`echo \$xenv | awk -F: '{n=0 ; for(i=NF;i>=1;i--){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=n-1;j>=0;j--){printf "%s",keys[j];if(j>0) printf ":"} ; printf "\n"}'\`
+    export \$1=\$out_var
+}
 EOF
-product_sequence="$2"
-#for i in `ls -a ${install_work} | grep -E "..*" | grep -v ".salome.*"` ; do
-for i in $product_sequence ; do
-    cat ${install_work}/env_${i}.sh >> ${install_work}/$SHRC 2>/dev/null
-done 
+### !!! writing salome.csh file !!! -> add global aliases
+cat >> ${install_work}/$CSHRC <<EOF
+setenv INSTALL_ROOT ${install_root}
+#$DELIM globals $DELIM
+alias cleandup  "echo \!:1 | awk -F: '"'{n=0 ; for(i=1;i<=NF;i++){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=0;j<n;j++){printf "%s",keys[j];if(j<n-1) printf ":"} ; printf "\n"}'"'"
+alias cleandupr "echo \!:1 | awk -F: '"'{n=0 ; for(i=NF;i>=1;i--){v=\$i;t=1;for(j=0;j<=n;j++){if(keys[j]==v){t=0;break;}};if(t)keys[n++]=v} ; for(j=n-1;j>=0;j--){printf "%s",keys[j];if(j>0) printf ":"} ; printf "\n"}'"'"
 
-sed -e 's%^export \([[:alnum:]_[:blank:]]*\)\=%setenv \1 %g' -e 's%^#csh-specific  %%g' ${INSTALL_WORK}/$SHRC > ${INSTALL_WORK}/_$CSHRC
+alias setenva 'set a="\!:1" ; set b=\`printenv \$a\`:"'\!:2'" ; set b=\`cleandupr \$b\` ; setenv \$a \$b ; unset a, b'
+alias setenvp 'set a="\!:1" ; set b="'\!:2'":\`printenv \$a\` ; set b=\`cleandup \$b\`  ; setenv \$a \$b ; unset a, b'
+EOF
+### !!! writing salome.csh file !!! -> set inital variables
 pre_vars="PATH LD_LIBRARY_PATH LD_RUN_PATH PYTHONPATH"
 for i in $pre_vars ; do
 cat >> ${install_work}/$CSHRC <<EOF
+#$DELIM initial settings $DELIM
 if (! (\$?${i}) ) then
   setenv $i
 endif
 EOF
 done
-cat ${INSTALL_WORK}/_$CSHRC >> ${INSTALL_WORK}/$CSHRC
-rm -f ${INSTALL_WORK}/_$CSHRC
+### !!! writing salome.(c)sh files !!! -> dump products environment files, changing 'export' by 'setenv(a|b)' where necessary
+product_sequence="$2"
+for i in $product_sequence ; do
+    sed -e 's%^export\([[:blank:]]*\)PATH=\$[{]\?PATH[}]\?:\(.*\)%setenva\1PATH \2%g' -e 's%^export\([[:blank:]]*\)PATH=\(.*\):\$[{]\?PATH[}]\?%setenvp\1PATH \2%g' ${install_work}/env_${i}.sh > ${INSTALL_WORK}/_tmp1 2>/dev/null
+    sed -e 's%^export\([[:blank:]]*\)LD_LIBRARY_PATH=\$[{]\?LD_LIBRARY_PATH[}]\?:\(.*\)%setenva\1LD_LIBRARY_PATH \2%g' -e 's%^export\([[:blank:]]*\)LD_LIBRARY_PATH=\(.*\):\$[{]\?LD_LIBRARY_PATH[}]\?%setenvp\1LD_LIBRARY_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2 2>/dev/null
+    sed -e 's%^export\([[:blank:]]*\)PYTHONPATH=\$[{]\?PYTHONPATH[}]\?:\(.*\)%setenva\1PYTHONPATH \2%g' -e 's%^export\([[:blank:]]*\)PYTHONPATH=\(.*\):\$[{]\?PYTHONPATH[}]\?%setenvp\1PYTHONPATH \2%g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
+    sed -e 's%^export\([[:blank:]]*\)LD_RUN_PATH=\$[{]\?LD_RUN_PATH[}]\?:\(.*\)%setenva\1LD_RUN_PATH \2%g' -e 's%^export\([[:blank:]]*\)LD_RUN_PATH=\(.*\):\$[{]\?LD_RUN_PATH[}]\?%setenvp\1LD_RUN_PATH \2%g' ${INSTALL_WORK}/_tmp1 > ${INSTALL_WORK}/_tmp2 2>/dev/null
+    cat ${INSTALL_WORK}/_tmp2 >> ${install_work}/$SHRC 2>/dev/null
+    
+    sed -e 's%^export \([[:alnum:]_[:blank:]]*\)\=%setenv \1 %g' ${INSTALL_WORK}/_tmp2 > ${INSTALL_WORK}/_tmp1 2>/dev/null
+    cat ${INSTALL_WORK}/_tmp1 >> ${install_work}/$CSHRC 2>/dev/null
+
+    rm -f ${INSTALL_WORK}/_tmp1 ${INSTALL_WORK}/_tmp2
+done 
 
 if [ $# -eq 4 ] ; then
     product_dir=$4