forked from Seyond-Inc/seyond_ros_driver
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.bash
More file actions
executable file
·33 lines (27 loc) · 1.01 KB
/
build.bash
File metadata and controls
executable file
·33 lines (27 loc) · 1.01 KB
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
#!/bin/bash
set -e
CURRENT_PATH=$(cd $(dirname $0); pwd)
CLIENT_SDK_PATH=${CURRENT_PATH}/src/seyond_lidar_ros/src/seyond_sdk/
echo -e "\n\033[1;32m-- (a). Clean the old build files...\033[0m"
rm -rf ${CURRENT_PATH}/build ${CURRENT_PATH}/install ${CURRENT_PATH}/devel ${CURRENT_PATH}/log
rm -rf ${CURRENT_PATH}/src/CMakeLists.txt
echo -e "\n\033[1;32m-- (b). Check the Seyond SDK...\033[0m"
if [[ -e "${CLIENT_SDK_PATH}/lib/libinnolidarsdkclient.a" ]]; then
echo "The seyond_sdk has already been compiled, but please verify it is compatible with the current platform"
else
# build cilent sdk
echo "The seyond_sdk has not been compiled, start to compile the seyond_sdk"
cd ${CLIENT_SDK_PATH}/build
./build_unix.sh
echo "build status $?"
cd -
fi
echo -e "\n\033[1;32m-- (c). Build the driver...\033[0m"
if [[ "$ROS_VERSION" -eq 1 ]]; then
catkin_make install
elif [[ "$ROS_VERSION" -eq 2 ]]; then
colcon build
else
echo "Can't find ROS_VERSION or ROS2_VERSION"
fi
echo -e "\n\033[1;32m-- (d). Build Done!\033[0m"