-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.sh
41 lines (36 loc) · 971 Bytes
/
main.sh
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
#!/bin/bash
#Please do not use script if you are not sure about your system version or it's compatability with ROS noetic
#read -p "Enter your Ubuntu version(18, 20, 22): " ver
source functions.sh
if [[ ! -n $1 ]]
then
echo "No argument given. Check README before retrying"
exit 1
fi
ver=$1
wait || { echo "Something failed: $?" >&2; exit 1;}
#for 20.04
if [[ $ver -eq 20 ]]
then
ros_install_and_build_20_18
px4clover_install_build
#for 18.04 - pretty simillar to 20.04 but may be a bit more unstable
elif [[ $ver -eq 18 ]]
then
ros_install_and_build_20_18
px4clover_install_build
#for 22.04 - can be very unstable because of incompatiability of ROS and this version of ubuntu. But somehow works.
elif [[ $ver -eq 22 ]]
then
ros_install_and_build_22
px4clover_install_build
#test
elif [[ $ver -eq 99 ]]
then
echo "are you sure?"
read answ
if [[ $answ == "yes" ]]
then
ros2_install_and_build_test
fi
fi