forked from toastpp/toastpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtoastenv.sh.in
45 lines (41 loc) · 1.17 KB
/
toastenv.sh.in
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
# TOAST environment variables generated with configure
# Run this with 'source toastenv.sh' from your sh/bash shell.
if test "x$TOASTDIR" = x; then
echo "TOASTDIR environment variable not set!"
if test -f "mtoast_install.m" ; then
export TOASTDIR=$PWD
fi
fi
if test "x$TOASTDIR" = x ; then
echo "Cannot set the TOAST environment."
else
echo "Using TOASTDIR = $TOASTDIR"
export TOASTVER=$TOASTDIR/@ARCHDIR@
export TOAST_SCRIPT_PATH=$TOASTDIR/script
export PYTHONPATH=$TOAST_SCRIPT_PATH/python/lib/python2.6/site-packages
# NEED TO MAKE THIS GENERAL!!!
IFS=:
# Add $TOASTVER/bin to path
EXEPATH="$TOASTVER/bin"
UPDATEPATH="yes"
for dir in $PATH ; do
if [ "$dir" = "$EXEPATH" ]; then
UPDATEPATH="no"
fi
done
if [ "$UPDATEPATH" = "yes" ]; then
export PATH="$EXEPATH""$IFS""$PATH"
fi
# Add $TOASTVER/lib to library path
LIBPATH="$TOASTVER/lib"
UPDATEPATH="yes"
for dir in $LD_LIBRARY_PATH ; do
if [ "$dir" = "$LIBPATH" ]; then
UPDATEPATH="no"
fi
done
if [ "$UPDATEPATH" = "yes" ]; then
export LD_LIBRARY_PATH="$LIBPATH""$IFS""$LD_LIBRARY_PATH"
fi
echo "TOAST environment has been set."
fi