-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathsetenv
More file actions
20 lines (17 loc) · 764 Bytes
/
setenv
File metadata and controls
20 lines (17 loc) · 764 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env -S sh -c "echo >&2 \"Error: You are running this script instead of sourcing it. Make sure to use it as 'source setenv' or '. setenv', otherwise its settings won't take effect.\"; exit 1"
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 bin/simu5g ]; then
echo "Error: current working directory does not look like a Simu5G root directory"
# no exit -- it would close the shell
else
export SIMU5G_ROOT=`pwd`
echo "$SIMU5G_ROOT added to PATH"
export PATH="$SIMU5G_ROOT/bin:$PATH"
export OMNETPP_IMAGE_PATH="$OMNETPP_IMAGE_PATH:$SIMU5G_ROOT/images"
fi