forked from omnetpp/omnetpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetenv
executable file
·35 lines (31 loc) · 1.14 KB
/
setenv
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
#! /bin/sh
case "$-" in
*i*) ;;
*) if [ "$1" != "-f" ]; then # allow use from scripts, as ". setenv -f"
echo "Error: not a login shell -- run this script as 'source setenv' or '. setenv'"
exit 1
fi
esac
if [ ! -f configure.user -o ! -f include/omnetpp.h ]; then
echo "Error: current working directory does not look like an OMNeT++ root directory"
# no exit -- it would close the shell
else
omnetpp_root=`pwd`
echo $omnetpp_root
if [ `uname` = "Linux" ]; then
export LD_LIBRARY_PATH=$omnetpp_root/lib:$LD_LIBRARY_PATH
fi
if [ `uname` = "Darwin" ]; then
export DYLD_LIBRARY_PATH=$omnetpp_root/lib:$DYLD_LIBRARY_PATH
if [ ! -d $omnetpp_root/tools/macosx ]; then
echo "WARNING! We are on Mac OS X, but it seems that you have downloaded the Linux version of the installation package!"
else
cd $omnetpp_root/tools/macosx && source setenv ; cd - >/dev/null
fi
fi
export PATH=$omnetpp_root/bin:$PATH
export PYTHONPATH=$omnetpp_root/python:$PYTHONPATH
export HOSTNAME
export HOST
export QT_SELECT=5 # on systems with qtchooser, switch to Qt5
fi