-
Notifications
You must be signed in to change notification settings - Fork 3
/
install_basic.sh
250 lines (166 loc) · 5.41 KB
/
install_basic.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
#!/bin/bash
set -e
set -x
function blank_line {
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' -
echo $'\n'
}
sudo apt-get update
blank_line
echo "Installing Docker..." $'\n'
blank_line
## Install Docker
sudo apt-get install docker.io docker-compose -y
## Setup Python3 PIP
blank_line
echo "Installing Python3-PIP..." $'\n'
blank_line
sudo apt-get install python3-pip -y
## Install ROS Melodic - http://wiki.ros.org/melodic/Installation/Ubuntu
# First add the ROS repository by going to "Software and Updates" in Applications, making sure that the four checkboxes in Ubuntu Software are ticked and that Canonical Partners is enabled in Other Software
blank_line
echo "Installing ROS..." $'\n'
blank_line
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo apt update
# sometimes dependencies are not met. Then run sudo apt --fix-broken install
{ # try
sudo apt install ros-melodic-desktop-full
} || { # catch
sudo apt --fix-broken install
sudo apt install ros-melodic-desktop-full
}
sudo rosdep init
rosdep update
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
#sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt-get install python-rosinstall -y
sudo apt-get update
sudo apt-get install python-catkin-tools
## Gazebo
blank_line
echo "Installing Gazebo..." $'\n'
blank_line
# You will need to add the osrfoundation repo to your Linux package system in order to get the new packages of Gazebo.
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
## VS Code
#You need to enable package repository in your system. Create a new file
## Terminator
blank_line
echo -e "Install VS Code (Delft IDE)? [y/n]"
read vscode
if [ $vscode = 'y']
then
blank_line
echo "Installing Visual Studio Code..." $'\n'
blank_line
sudo touch /etc/apt/sources.list.d/vscode.list
#echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list
echo "deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main" | sudo tee /etc/apt/sources.list.d/vscode.list
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo apt-get update
sudo apt-get install code -y
fi
blank_line
echo -e "Install Sublime? [y/n]"
read sublime
if [ $sublime = 'y']
then
#Install Sublime
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text
fi
## Terminator
blank_line
echo -e "Install Terminator? [y/n]"
read terminator
if [ $terminator == 'y' ]
then
echo "Installing Terminator..." $'\n'
blank_line
#sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator -y
fi
## Vim
blank_line
echo -e "Install vim? [y/n]"
read vim
if [ $vim == 'y' ]
then
echo "Installing Vim..." $'\n'
blank_line
sudo apt-get install vim -y
fi
# Blank Line
# GitKraken
blank_line
echo -e "Install GitKraken? [y/n]"
read gitkraken
## zsh
if [ $gitkraken == 'y' ]
then
echo "Installing Gitkraken..." $'\n'
blank_line
wget https://release.gitkraken.com/linux/gitkraken-amd64.deb
# sometimes dependencies are not met. Then run sudo apt --fix-broken install
{ # try
sudo dpkg -i gitkraken-amd64.deb
} || { # catch
# sudo apt-get install gconf2 gconf-service
sudo apt --fix-broken install
sudo dpkg -i gitkraken-amd64.deb
}
fi
# Slack
blank_line
echo -e "Install Slack Desktop? [y/n]"
read slack
## zsh
if [ $slack == 'y' ]
then
echo "Installing Slack..." $'\n'
blank_line
wget https://downloads.slack-edge.com/linux_releases/slack-desktop-4.0.2-amd64.deb
sudo apt install ./slack-desktop-*.deb
fi
### Other personal preferences such as Atom, Chrome, etc.
blank_line
echo -e "Install Chrome? [y/n]"
read chrome
## zsh
if [ $chrome == 'y' ]
then
# setup Chromium
echo "Installing Chrome Browser..." $'\n'
blank_line
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
rm -rf google-chrome-stable_current_amd64.deb
#echo "In case an error is encountered in above step, run `sudo apt-get -f install`"
fi
# Blank Line
blank_line
echo -e "Install zsh? [y/n]" $'\n'
read zsh
## zsh
if [ $zsh == 'y' ]
then
echo "Installing oh-my-zsh (https://github.com/robbyrussell/oh-my-zsh)" $'\n'
blank_line
#setup oh-my-zsh
sudo apt install curl
sudo apt-get install zsh -y
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sed "s/env zsh//g")"
chsh -s $(which zsh)
# Blank Line
blank_line
fi
echo "Installation of all basic softwares and packages successful!"
echo "It is recommended that you restart your computer and start afresh."