This repository has been archived by the owner on Aug 20, 2021. It is now read-only.
forked from ErickWendel/ew-ubuntu-setup
-
Notifications
You must be signed in to change notification settings - Fork 10
/
startup.sh
261 lines (210 loc) · 7.61 KB
/
startup.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
250
251
252
253
254
255
256
257
258
259
260
261
#!/bin/bash
echo "Welcome! Let's start setting up your system xD It could take more than 10 minutes, be patient"
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get install build-essential -y
echo 'installing wget'
sudo apt install gdebi-core wget
echo 'installing curl'
sudo apt install curl -y
echo 'installing vim'
sudo apt install vim -y
clear
echo 'installing git'
sudo apt install git -y
echo "What name do you want to use in GIT user.name?"
echo "For example, mine will be \"Olavio Lacerda\""
read git_config_user_name
git config --global user.name "$git_config_user_name"
clear
echo "What email do you want to use in GIT user.email?"
echo "For example, mine will be \"[email protected]\""
read git_config_user_email
git config --global user.email $git_config_user_email
clear
echo "Can I set VIM as your default GIT editor for you? (y/n)"
read git_core_editor_to_vim
if echo "$git_core_editor_to_vim" | grep -iq "^y" ;then
git config --global core.editor vim
else
echo "Okay, no problem. :) Let's move on!"
fi
echo "Generating a SSH Key"
ssh-keygen -t rsa -b 4096 -C $git_config_user_email
ssh-add ~/.ssh/id_rsa
cat ~/.ssh/id_rsa.pub | xclip -selection clipboard
echo 'enabling workspaces for both screens'
gsettings set org.gnome.mutter workspaces-only-on-primary false
echo 'installing zsh'
sudo apt-get install zsh -y
sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
chsh -s /bin/zsh
echo 'installing tool to handle clipboard via CLI'
sudo apt-get install xclip -y
export alias pbcopy='xclip -selection clipboard'
export alias pbpaste='xclip -selection clipboard -o'
source ~/.zshrc
echo 'installing code'
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
sudo apt-get install apt-transport-https -y
sudo apt-get update
sudo apt-get install code -y # or code-insiders
echo 'installing extensions'
code --install-extension Shan.code-settings-sync
echo 'installing spotify'
snap install spotify
echo 'installing chrome'
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
echo 'installing nvm'
sh -c "$(curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash)"
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/creationix/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
echo '\nexport PATH=/usr/local/share/npm/bin:$PATH\n'
echo '\nexport NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"\n' >> .zshrc
source ~/.zshrc
nvm --version
nvm install 16
nvm alias default 16
node --version
npm --version
echo 'installing Typescript'
npm install -g typescript
echo 'installing autosuggestions'
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
echo "source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ~/.zshrc
source ~/.zshrc
echo 'installing theme'
sudo apt install fonts-firacode -y
wget -O ~/.oh-my-zsh/themes/node.zsh-theme https://raw.githubusercontent.com/skuridin/oh-my-zsh-node-theme/master/node.zsh-theme
sed -i 's/.*ZSH_THEME=.*/ZSH_THEME="node"/g' ~/.zshrc
echo 'installing franz'
sudo apt-get update
sudo apt-get install com.meetfranz.meetfranz
echo 'installing discord'
sudo apt-get update
wget -O ~/discord.deb "https://discordapp.com/api/download?platform=linux&format=deb"
sudo gdebi ~/discord.deb -y
echo 'installing terminator'
sudo apt-get update
sudo apt-get install terminator -y
echo 'adding dracula theme'
mkdir ~/.config/terminator
touch ~/.config/terminator/config
cat <<EOF > ~/.config/terminator/config
[global_config]
title_transmit_bg_color = "#ad7fa8"
[keybindings]
close_term = <Primary>w
close_window = <Primary>q
new_tab = <Primary>t
new_window = <Primary>i
paste = <Primary>v
split_horiz = <Primary>e
split_vert = <Primary>d
switch_to_tab_1 = <Primary>1
switch_to_tab_10 = <Primary>0
switch_to_tab_2 = <Primary>2
switch_to_tab_3 = <Primary>3
switch_to_tab_4 = <Primary>4
switch_to_tab_5 = <Primary>5
switch_to_tab_6 = <Primary>6
[layouts]
[[default]]
[[[child1]]]
parent = window0
type = Terminal
[[[window0]]]
parent = ""
type = Window
[plugins]
[profiles]
[[default]]
cursor_color = "#aaaaaa"
EOF
cat <<EOF >> ~/.config/terminator/config
[[Dracula]]
background_color = "#1e1f29"
background_darkness = 0.88
background_type = transparent
copy_on_selection = True
cursor_color = "#bbbbbb"
foreground_color = "#f8f8f2"
palette = "#000000:#ff5555:#50fa7b:#f1fa8c:#bd93f9:#ff79c6:#8be9fd:#bbbbbb:#555555:#ff5555:#50fa7b:#f1fa8c:#bd93f9:#ff79c6:#8be9fd:#ffffff"
scrollback_infinite = True
EOF
echo 'installing docker'
sudo apt-get remove docker docker-engine docker.io
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker
docker --version
chmod 777 /var/run/docker.sock
docker run hello-world
echo 'installing docker-compose'
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
echo 'installing fzf'
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --all
source ~/.zshrc
echo 'installing dbeaver'
wget -c https://dbeaver.io/files/6.0.0/dbeaver-ce_6.0.0_amd64.deb
sudo dpkg -i dbeaver-ce_6.0.0_amd64.deb
sudo apt-get install -f
echo 'installing Postman'
snap install postman
echo 'installing Redocs'
sudo npm install -g @redocly/openapi-cli
echo 'installing Golang'
wget -c https://golang.org/dl/go1.16.3.linux-amd64.tar.gz
shasum -a 256 go1.16.3.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.16.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
go version
sudo mkdir ~/go
sudo cat <<EOF >> ~/.zshrc
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
EOF
echo 'commiting changes'
source ~/.zshrc
sudo dpkg --configure -a
sudo apt-get update --fix-missing
sudo apt-get autoremove
rm -rf = bash_completion Close Compressing discord.deb Downloading nvm
clear
echo 'Do you wanna install extra content? (y/N)'
read extra_content
if echo "$extra_content" | grep -iq "^y" ;then
echo 'installing vlc'
sudo apt install vlc -y
sudo apt install vlc-plugin-access-extra libbluray-bdj libdvdcss2 -y
echo 'installing transmission'
sudo add-apt-repository ppa:transmissionbt/ppa
sudo apt-get update
sudo apt-get install transmission transmission-qt -y
echo 'installing Robo3t'
snap install robo3t-snap
echo 'installing kubectl'
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl
echo 'installing heroku-cli'
curl https://cli-assets.heroku.com/install-ubuntu.sh | sh
heroku --version
echo 'installing aws-cli'
sudo apt-get install awscli -y
aws --version
curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb"
sudo dpkg -i session-manager-plugin.deb
session-manager-plugin --version
else
echo "Okay, no problem. :) Let's finish it then!"
fi
echo 'All tools successfully installed. You are ready to shine :).'