-
Notifications
You must be signed in to change notification settings - Fork 13
/
env_for_python.sh
executable file
·57 lines (47 loc) · 1.43 KB
/
env_for_python.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/bash
# TRUST python tools initialization script
err=0
# check if TRUST env is sourced. Otherwise source it !
if [ ! -d "${TRUST_ROOT}" ]; then
DIR=$(cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd)
source $DIR/env_TRUST.sh || err=1
fi
[ $err = 1 ] && echo "Error: cannot load env_for_python.sh. TRUST not yet installed!" && return 1
ok=1
# Chargement TRUST ICoCo swig
if [ "`echo $PYTHONPATH | grep -i Outils/ICoCo/ICoCo_src/share/swig/install/lib`" = "" ] && [ "$TRUST_DISABLE_MPI" -eq 0 ]
then
if [ -f $TRUST_ROOT/Outils/ICoCo/ICoCo_src/share/swig/install/lib/_trusticoco.so ]
then
source $TRUST_ROOT/Outils/ICoCo/ICoCo_src/share/swig/env.sh
else
echo "Error: cannot load 'trusticoco', not yet installed!"
ok=0
fi
fi
# Chargement MEDCoupling
if [ "`echo $PYTHONPATH | grep -i LIBMEDCOUPLING/${TRUST_ARCH}_opt/bin`" = "" ]
then
if [ -f $TRUST_MEDCOUPLING_ROOT/env.sh ]
then
source $TRUST_MEDCOUPLING_ROOT/env.sh
else
echo "Error: cannot load MEDCoupling, not yet installed!"
ok=0
fi
fi
# Chargement lata_tools
if [ "`echo $PYTHONPATH | grep -i exec/lata_tools`" = "" ]
then
source $TRUST_ROOT/Outils/lata_tools/src/tools/env.sh
fi
# Chargement de trustify
if [ "`echo $PYTHONPATH | grep -i trustify`" = "" ]
then
source $TRUST_ROOT/Outils/trustify/env.sh
fi
if [ $ok = 1 ]; then
echo "env_for_python.sh successfully loaded."
else
echo "env_for_python.sh only partially loaded!!"
fi