-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
59 lines (47 loc) · 1.92 KB
/
install
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
56
57
58
59
#!/bin/bash
. ./scripts/common.sh
. ./scripts/ros_setup.sh
set_colors
echo -e "${BLUE}This is ROS setup sript${NOCOLOR}"
read -p "Do you wish to start the installtion? [Y/n]" -n 1 -s ans && echo
[ "${ans}" != "n" ] || exit 0
echo -e "${BLUE}Installing system updates${NOCOLOR}"
sudo apt update && sudo apt upgrade -y
[ $? -eq 0 ] || error "Failed to update apt-get, aborting..."
echo -e "${GREEN}System update done${NOCOLOR}"
echo -e "${BLUE}Installing ROS dependencies${NOCOLOR}"
install_rosdeps
[ $? -eq 0 ] || error "Failed to install ROS dependencies, aborting..."
echo -e "${GREEN}ROS dependencies installation done${NOCOLOR}"
echo -e "${BLUE}Installing ROS${NOCOLOR}"
install_ros
[ $? -eq 0 ] || error "Failed to install ROS, aborting..."
echo -e "${GREEN}ROS installation done${NOCOLOR}"
echo -e "${BLUE}Installing pip modules${NOCOLOR}"
python3 -m pip install wheel
python3 -m pip install -r requirements.txt
[ $? -eq 0 ] || echo "${RED}Failed install pip modules, continuing...${NOCLOR}"
echo -e "${GREEN}Pip modules installaion done${NOCOLOR}"
read -p "Do you wish to install simulator (Gazebo) [Y/n]" -n 1 -s ans && echo
[ "${ans}" != "n" ] && install_gazebo
echo -e "${GREEN}Gazebo installation done${NOCOLOR}"
read -p "Do you wish to install desktop environment (xfce4) [Y/n]" -n 1 -s ans \
&& echo
if [ "${ans}" != "n" ]; then
. ./scripts/de_setup.sh
install_de
[ $? -eq 0 ] || error "Failed to install xfce dependencies, aborting..."
config_xfce_theming
[ $? -eq 0 ] || echo "${RED}Failed to theme xfce, continuing...${NOCLOR}"
echo -e "${GREEN}Desktop environment installation done${NOCOLOR}"
fi
read -p "Do you wish to optimize userspace for ROS [Y/n]" -n 1 -s ans && echo
if [ "${ans}" != "n" ]; then
. ./scripts/user_setup.sh
setup_user
fi
echo -e "${GREEN}Userspace setup done${NOCOLOR}"
echo -e "${BLUE}Setup finished${NOCOLOR}"
read -p "Do you wish to reboot now? [Y/n]" -n 1 -s ans && echo
[ "${ans}" != "n" ] && reboot
exit 0