-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
417 lines (359 loc) · 12 KB
/
Copy pathsetup.sh
File metadata and controls
417 lines (359 loc) · 12 KB
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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
#!/bin/bash
##################################################################################################
# Author: Antonio #
# Credits: Shubham Pathk #
# Description: Auto setup bash script to setup required programs after doing fresh install. #
# Tested against Debian based distributions like Ubuntu 16.04/18.04 and Kali Linux. #
##################################################################################################
c='\e[32m' # Coloured echo (Green)
r='tput sgr0' #Reset colour after echo
REPO_ROOT=$(pwd)
# Required dependencies for all softwares (important)
echo -e "${c}Installing complete dependencies pack."; $r
sudo apt install -y software-properties-common apt-transport-https build-essential checkinstall libreadline-gplv2-dev libxssl libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev autoconf automake libtool make g++ unzip flex bison gcc libssl-dev libyaml-dev libreadline6-dev zlib1g zlib1g-dev libncurses5-dev libffi-dev libgdbm5 libgdbm-dev libpq-dev libpcap-dev libmagickwand-dev libappindicator3-1 libindicator3-7 imagemagick xdg-utils
# Show Battery Percentage on Top Bar [Debian (gnome)]
if [ $XDG_CURRENT_DESKTOP == 'GNOME' ]; then
gsettings set org.gnome.desktop.interface show-battery-percentage true
fi
# Upgrade and Update Command
echo -e "${c}Updating and upgrading before performing further operations."; $r
sudo apt update && sudo apt upgrade -y
sudo apt --fix-broken install -y
#Snap Installation & Setup
echo -e "${c}Installing Snap & setting up."; $r
sudo apt install -y snapd
sudo systemctl start snapd
sudo systemctl enable snapd
sudo systemctl start apparmor
sudo systemctl enable apparmor
export PATH=$PATH:/snap/bin
sudo snap refresh
echo -e "${c}Install libavcodec-extra."; $r
sudo apt install -y libavcodec-extra
#Setting up Git
echo -e "${c}Installing Git"; $r
sudo apt -y install git
read -p "${c}Do you want to setup Git global config? (y/n): " -r; $r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo -e "${c}Setting up Git"; $r
(set -x; git --version )
echo -e "${c}Setting up global git config at ~/.gitconfig"; $r
git config --global color.ui true
read -p "Enter Your Full Name: " name
read -p "Enter Your Email: " email
git config --global user.name "$name"
git config --global user.email "$email"
echo -e "${c}Git Setup Successfully!"; $r
else
echo -e "${c}Skipping!"; $r && :
fi
#Installing curl and wget
echo -e "${c}Installing Curl and wget"; $r
sudo apt-get install -y wget curl
#Installing xclip
echo -e "${c}Installing xclip"; $r
sudo apt-get install -y xclip
#Installing zsh
echo -e "${c}Installing zsh"; $r
sudo apt-get install -y zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
#Installing dig
echo -e "${c}Installing DNS Utils"; $r
sudo apt install -y dnsutils
#Installing ADB and Fastboot
echo -e "${c}Installing ADB and Fastboot"; $r
sudo apt install -y android-tools-adb android-tools-fastboot
#Installing libc6
echo -e "${c}Installing libc6"; $r
sudo apt-get install -y libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
#Installing gnome-tweak-tool
echo -e "${c}Installing Ubuntu Extensions"; $r
sudo apt install -y gnome-tweak-tool
sudo apt-get install chrome-gnome-shell -y
#Installing Media Codecs
sudo apt install ubuntu-restricted-extras -y
#Creating Directory Inside $HOME
echo -e "${c}Creating Directory named 'tools' inside $HOME directory."; $r
cd
mkdir -p tools
installGo() {
echo -e "${c}Installing Go version 1.14.1"; $r #Latest version at the time of updating.
cd
wget -q https://dl.google.com/go/go1.14.1.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.14.1.linux-amd64.tar.gz
sudo rm -f go1.14.1.linux-amd64.tar.gz
echo -e "${c}Setting up GOPATH as $HOME/go"; $r
echo "export GOPATH=$HOME/go" >> ~/.profile
echo "export PATH=$PATH:$GOPATH/bin:/usr/local/go/bin" >> ~/.profile
source ~/.profile
echo -e "${c}Go Installed Successfully."; $r
}
checkGo() {
echo -e "${c}Checking if Go is installed."; $r
source ~/.profile
source ~/.bashrc
if [[ -z $(which go) ]]; then
echo -e "${c}Go is not installed, installing it first."; $r
installGo
else
echo -e "${c}Go is already installed, Skipping."; $r
fi
}
#Executing Install Dialog
dialogbox=(whiptail --separate-output --ok-button "Install" --title "Auto Setup Script" --checklist "\nPlease select required software(s):\n(Press 'Space' to Select/Deselect, 'Enter' to Install and 'Esc' to Cancel)" 30 80 20)
options=(1 "Visual Studio Code" on
2 "Modern CLI Tools (eza, bat, etc.)" on
3 "Python3" off
4 "Go" off
5 "Android Studio" off
6 "Amazon Corretto" off
7 "Chrome" off
8 "Jadx (Java Decompiler)" off
9 "httprobe" off
10 "SQLMAP" off
11 "i3 Window Manager" off
12 "NodeJS (LTS)" on
13 "Wireshark" off
14 "Knockpy" off
15 "Dirsearch" off
16 "LinkFinder" off
17 "Virtual Box" off
18 "Node Version Mananger" on
19 "YARN" on
20 "Java (Latest LTS)" on
21 "MYSQL" on
22 "Docker" on
23 "Docker Compose (V2)" on
24 "Telegram" on
25 "Steam" on
26 "VLC Media Player" on
27 "Postman" on
28 "LazyGit" on
29 "LazyDocker" on
30 "Bun (JS Runtime)" on
31 "Starship Prompt" on
32 "Zsh Configuration" on
33 "Zellij (Terminal Workspace)" on
34 "Yazi (File Manager)" on
)
selected=$("${dialogbox[@]}" "${options[@]}" 2>&1 >/dev/tty)
for choices in $selected
do
case $choices in
1)
echo -e "${c}Installing Visual Studio Code"; $r
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 update -y
sudo apt install -y code
sudo rm -f microsoft.gpg
echo -e "${c}Visual Studio Code Installed Successfully."; $r
;;
2)
echo -e "${c}Installing Modern CLI Tools"; $r
chmod +x "$REPO_ROOT/programas/cli-tools/setup.sh"
"$REPO_ROOT/programas/cli-tools/setup.sh"
;;
3)
echo -e "${c}Installing Python3"; $r
( set -x ; sudo add-apt-repository ppa:deadsnakes/ppa -y )
sudo apt install -y python3
( set -x ; python3 --version )
;;
4)
installGo
;;
5)
echo -e "${c}Android Studio"; $r
sudo add-apt-repository ppa:maarten-fonville/android-studio
sudo apt-get install -y android-studio
;;
6)
echo -e "${c}Setting up Amazon Corretto (OpenJDK)"; $r
wget -O- https://apt.corretto.aws/corretto.key | sudo apt-key add -
echo "deb https://apt.corretto.aws stable main" | sudo tee /etc/apt/sources.list.d/corretto.list
( set -x ; java -version )
echo -e "${c}Amazon Corretto Installed Successfully!"; $r
;;
7)
echo -e "${c}Installing Chrome"; $r
cd
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install -y
rm -f google-chrome-stable_current_amd64.deb
;;
8)
echo -e "${c}Installing JADX (Java Decompiler)"; $r
cd && cd tools
git clone --depth 1 https://github.com/skylot/jadx.git
cd jadx
./gradlew dist
echo -e "${c}JADX Installed Successfully."; $r
;;
9)
echo -e "${c}Installing httprobe"; $r
checkGo
go get -u github.com/tomnomnom/httprobe
;;
10)
echo -e "${c}Downloading SQLMAP"; $r
cd && cd tools
git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git sqlmap-dev
echo -e "${c}SQLMAP Downloaded Successfully. Go to $HOME/tools/sqlmap-dev to run it."; $r
;;
11)
echo -e "${c}Installing i3 Window Manager"; $r
sudo apt install -y i3
;;
12)
echo -e "${c}Installing NodeJS"; $r
cd
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs
( set -x; nodejs -v )
echo -e "${c}NodeJS Installed Successfully."; $r
;;
13)
echo -e "${c}Installing Wireshark"; $r
sudo apt install -y wireshark
sudo dpkg-reconfigure wireshark-common
echo -e "${c}Adding user to wireshark group."; $r
sudo usermod -aG wireshark $USER
echo -e "${c}Wireshark Installed Successfully."; $r
;;
14)
echo -e "${c}Installing Knockpy in $HOME/tools"; $r
cd && cd tools
sudo apt install -y python-dnspython
git clone --depth 1 https://github.com/guelfoweb/knock.git
cd knock
sudo python setup.py install
echo -e "${c}Knockpy Installed Successfully."; $r
;;
15)
echo -e "${c}Downloading Dirsearch in $HOME/tools"; $r
cd && cd tools
git clone --depth 1 https://github.com/maurosoria/dirsearch.git
echo -e "${c}Dirsearch Downloaded."; $r
;;
16)
echo -e "${c}Installing LinkFinder in $HOME/tools"; $r
cd && cd tools
git clone --depth 1 https://github.com/GerbenJavado/LinkFinder.git
cd LinkFinder
sudo pip install argparse jsbeautifier
sudo python setup.py install
echo -e "${c}LinkFinder Installed Successfully."; $r
;;
17)
echo -e "${c}Installing VirtualBox"; $r
sudo apt install -y virtualbox
;;
18)
echo -e "${c}Installing NVM"; $r
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
nvm install --lts
nvm use --lts
;;
19)
echo -e "${c}Installing YARN"; $r
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn -y
;;
20)
echo -e "${c}Installing Java (OpenJDK)"; $r
sudo apt-get update
sudo apt install -y openjdk-17-jdk
;;
21)
echo -e "${c}Installing MySql"; $r
sudo apt-get install mysql-client -y
;;
22)
echo -e "${c}Installing Docker"; $r
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo groupadd docker
sudo usermod -aG docker ${USER}
newgrp docker
su - ${USER}
id -nG
echo "sudo usermod -aG docker nome-do-usuário"
echo "docker run hello-world"
;;
23)
echo -e "${c}Installing Docker Compose Plugin"; $r
sudo apt-get update
sudo apt-get install -y docker-compose-plugin
docker compose version
echo "docker compose up -d"
;;
24)
echo -e "${c}Telegram"; $r
sudo add-apt-repository ppa:atareao/telegram
sudo apt-get update
sudo apt-get install telegram
;;
25)
echo -e "${c}Steam"; $r
sudo apt-get install steam-installer -y
;;
26)
echo -e "${c}VLC"; $r
sudo apt install vlc -y
;;
27)
echo -e "${c}Postman"; $r
sudo snap install postman
;;
28)
echo -e "${c}Installing LazyGit"; $r
chmod +x "$REPO_ROOT/programas/lazygit/setup.sh"
"$REPO_ROOT/programas/lazygit/setup.sh"
;;
29)
echo -e "${c}Installing LazyDocker"; $r
chmod +x "$REPO_ROOT/programas/lazydocker/setup.sh"
"$REPO_ROOT/programas/lazydocker/setup.sh"
;;
30)
echo -e "${c}Installing Bun"; $r
chmod +x "$REPO_ROOT/programas/bun/setup.sh"
"$REPO_ROOT/programas/bun/setup.sh"
;;
31)
echo -e "${c}Installing Starship"; $r
chmod +x "$REPO_ROOT/programas/starship/setup.sh"
"$REPO_ROOT/programas/starship/setup.sh"
;;
32)
echo -e "${c}Configuring Zsh"; $r
chmod +x "$REPO_ROOT/programas/zsh/setup.sh"
"$REPO_ROOT/programas/zsh/setup.sh"
;;
33)
echo -e "${c}Installing and Configuring Zellij"; $r
chmod +x "$REPO_ROOT/programas/zellij/setup.sh"
"$REPO_ROOT/programas/zellij/setup.sh"
;;
34)
echo -e "${c}Installing and Configuring Yazi"; $r
chmod +x "$REPO_ROOT/programas/yazi/setup.sh"
"$REPO_ROOT/programas/yazi/setup.sh"
;;
esac
done
# Final Upgrade and Update Command
echo -e "${c}Updating and upgrading to finish auto-setup script."; $r
sudo apt update && sudo apt upgrade -y
sudo apt --fix-broken install -y