-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_all.sh
45 lines (37 loc) · 1.24 KB
/
install_all.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
42
43
44
45
#! /bin/bash
# run this setup with the following command
# curl --silent https://raw.githubusercontent.com/auv-iitb/misc/master/install_all.sh | bash
x=$(pwd)
# Setup sources list
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'
# Setup keys
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
# Install
if [ -f ./install_deps.sh ]; then
bash ./install_deps.sh
else
curl --silent https://raw.githubusercontent.com/auv-iitb/misc/master/install_deps.sh | bash
fi
# Initialize rosdep
sudo rosdep init
rosdep update
sudo apt-get -y install python-rosinstall </dev/null
# Environment setup
source /opt/ros/indigo/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
printf "Getting the latest robosub repository"
cd ~/catkin_ws/src
git clone http://github.com/auv-iitb/robosub.git
if [ $? -eq 0 ]; then
cd ~/catkin_ws/
catkin_make
printf "Adding required files to ~/.bashrc\n"
echo 'source '`rospack find auv_utils`'/src/utility/bash/robosub_aliases' >> ~/.bashrc
echo 'source '`rospack find auv_utils`'/src/utility/bash/robosub_bash' >> ~/.bashrc
fi
cd $x