-
Notifications
You must be signed in to change notification settings - Fork 79
/
setup.bash.in
52 lines (45 loc) · 1.86 KB
/
setup.bash.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
46
47
48
49
50
51
52
#!/usr/bin/bash
_SETUP_PATH=$(cd `dirname $BASH_SOURCE[0]`; pwd)
USER_HOME_DIR=$(getent passwd $USER | cut -d: -f6)
CYBERRT_PATH=$(dirname "$_SETUP_PATH")
BUILD_PATH=$_SETUP_PATH
PATH=$_SETUP_PATH/bin/cyber/tools:$_SETUP_PATH/bin/cyber/mainboard:$PATH
PYTHONPATH=$_SETUP_PATH/lib/python@Python_VERSION@/site-packages:$_SETUP_PATH/lib/python@Python_VERSION@/site-packages/cyber/python/internal:$PYTHONPATH
LD_LIBRARY_PATH=$_SETUP_PATH/lib:$LD_LIBRARY_PATH
LIBRARY_PATH=$_SETUP_PATH/lib:$LIBRARY_PATH
CMAKE_PREFIX_PATH=$_SETUP_PATH:$CMAKE_PREFIX_PATH
PKG_CONFIG_PATH=$_SETUP_PATH/lib/pkgconfig:$_SETUP_PATH/share/pkgconfig:$PKG_CONFIG_PATH
CYBER_PATH=$_SETUP_PATH/share/
export PATH LD_LIBRARY_PATH CMAKE_PREFIX_PATH PKG_CONFIG_PATH PYTHONPATH CYBER_PATH
bazel_bin_path="${BUILD_PATH}/bin"
mainboard_path="${bazel_bin_path}/cyber/mainboard"
cyber_tool_path="${bazel_bin_path}/cyber/tools"
recorder_path="${cyber_tool_path}/cyber_recorder"
launch_path="${cyber_tool_path}/cyber_launch"
channel_path="${cyber_tool_path}/cyber_channel"
node_path="${cyber_tool_path}/cyber_node"
service_path="${cyber_tool_path}/cyber_service"
monitor_path="${cyber_tool_path}/cyber_monitor"
visualizer_path="${bazel_bin_path}/modules/tools/visualizer"
for entry in "${mainboard_path}" \
"${recorder_path}" "${monitor_path}" \
"${channel_path}" "${node_path}" \
"${service_path}" \
"${launch_path}" \
"${bazel_bin_path}" \
"${visualizer_path}" ; do
export PATH="${entry}":$PATH
done
# create log dir
CYBER_LOG_DIR_PREFIX="$USER_HOME_DIR/.cyber/log"
if [ ! -d "$CYBER_LOG_DIR_PREFIX" ]; then
mkdir -p "$CYBER_LOG_DIR_PREFIX"
fi
export GLOG_log_dir="$CYBER_LOG_DIR_PREFIX"
export GLOG_alsologtostderr=1
export GLOG_colorlogtostderr=1
export GLOG_minloglevel=0
export sysmo_start=0
export CYBER_DOMAIN_ID=80
export CYBER_IP=127.0.0.1
source ${BUILD_PATH}/cyber_tools_auto_complete.bash