forked from BoosterRobotics/booster_robotics_sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·55 lines (43 loc) · 1.47 KB
/
install.sh
File metadata and controls
executable file
·55 lines (43 loc) · 1.47 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
booster_sdk_dir=$(
cd $(dirname $0)
pwd
)
echo "Booster Robotics SDK Dir = $booster_sdk_dir"
cpu_arch=$(uname -m)
echo "CPU Arch=$cpu_arch"
third_party_dir=$booster_sdk_dir/third_party
echo "Third Party Dir = $third_party_dir"
set -e
sudo apt update -y
sudo apt install -y git
sudo apt install -y build-essential
sudo apt install -y cmake
sudo apt install -y libssl-dev
sudo apt install -y libasio-dev
sudo apt install -y libtinyxml2-dev
ubuntu_version=$(lsb_release -rs)
ubuntu_version_flag=20
case $ubuntu_version in
24.*) ubuntu_version_flag=24 ;;
22.*) ubuntu_version_flag=22 ;;
20.*) ubuntu_version_flag=20 ;;
18.*) ubuntu_version_flag=18 ;;
*) ubuntu_version_flag=0 ;;
esac
if [ $ubuntu_version_flag -eq 22 ] || [ $ubuntu_version_flag -eq 24 ]; then
booster_sdk_lib_dir=$booster_sdk_dir/lib/$cpu_arch
third_party_lib_dir=$third_party_dir/lib/$cpu_arch
else
booster_sdk_lib_dir=$booster_sdk_dir/lib/$cpu_arch/$ubuntu_version_flag
third_party_lib_dir=$third_party_dir/lib/$cpu_arch/$ubuntu_version_flag
fi
echo "SDK Lib Dir = $booster_sdk_lib_dir"
echo "Third Party Lib Dir = $third_party_lib_dir"
sudo cp -r $booster_sdk_dir/include/* /usr/local/include
sudo cp -r $booster_sdk_lib_dir/* /usr/local/lib
echo "Booster Robotics SDK installed successfully!"
sudo cp -r $third_party_dir/include/* /usr/local/include
sudo cp -r $third_party_lib_dir/* /usr/local/lib
echo "Third Party Libraries installed successfully!"
sudo ldconfig