-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenSUSE-package-installer.sh
executable file
Ā·484 lines (446 loc) Ā· 14 KB
/
OpenSUSE-package-installer.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
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
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
#! /usr/bin/bash
printf "\n\e[1;31m Welcome To OpenSUSE Tumbleweed \e[0m\n\n"
# Functions
# Ask For Options
function optionsList() {
case "$1" in [yY] | [yY][eE][sS])
printf "\n\e[1;32m $2: \e[0m\n\n"
options="$3"
counter=1
for option in $options; do
read -p "$counter. Do you want to $option ā y/n: " $option
((counter++))
done
;;
*)
printf ""
;;
esac
}
# Install Package With Zypper
function installPackage() {
case "$1" in [yY] | [yY][eE][sS])
printf "\n\nš„\e[1;32m Installing $2\e[0m\n"
sudo zypper install -y $2
printf "\nā
\e[1;32m $2\e[0m\n"
;;
*)
printf ""
;;
esac
}
# Install Package With Flatpack
function installPackageFlatpack() {
case "$1" in [yY] | [yY][eE][sS])
printf "\n\nš„\e[1;32m Installing $2\e[0m\n"
sudo flatpak install -y flathub $2
printf "\nā
\e[1;32m $2\e[0m\n"
;;
*)
printf ""
;;
esac
}
# A. Ask
QUESTIONS="UPDATE ADD_REPOSITORIES INSTALL_PACKAGES"
for QUESTION in $QUESTIONS; do
read -p "Do you want to $QUESTIONā y/n: " $QUESTION
done
# A.2. š§° Add ADD_REPOSITORIES
optionsList "$ADD_REPOSITORIES" "š§° Repositories" "PACKMAN FLATPAK"
# A.3 š ļø Install Packages
optionsList "$INSTALL_PACKAGES" "š ļø Choose Packages Categories" "DESKTOP_ENVIRONMENT DEV_TOOLS OFFICE MAIL MESSAGING MEDIA BROWSERS PHOTO_EDITING TERMINAL OTHER"
# šØ A.3.1. Choose Desktop Environment
optionsList "$DESKTOP_ENVIRONMENT" "šØ Choose Desktop Environment(s)" "AWESOME BUDGIE CINNAMON GNOME KDE MATE PANTHEON XFCE"
# šØāš» A.3.2 DEV_TOOLS
optionsList "$DEV_TOOLS" "šØāš» Choose Developer Tools" "CODIUM VSCODE CODEOSS SUBLIME PULSAR VIM NEOVIM DOCKER NVM NPM YARN TYPESCRIPT NodeCheckUpdate DOTNET GIT GITHUB_DESKTOP"
# Ask for Git config
case "$GIT" in [yY] | [yY][eE][sS])
read -p "What is git user name ā " GIT_NAME
read -p "What is git user Email ā " GIT_EMAIL
# echo " $GIT_NAME"
;;
*)
printf ""
;;
esac
# š¬ A.3.3 Choose Messaging
optionsList "$MESSAGING" "š¬ Choose Messaging Packages" "SIGNAL WHATSAPP"
# š A.3.3 Choose Office
optionsList "$OFFICE" "š Choose Office Packages" "LIBREOFFICE CALIBRE OKULAR FONTS TODOIST"
# š§ A.3.3 Choose Mail
optionsList "$MAIL" "š§ Choose Mail Packages" "THUNDERBIRD MAILSPRING"
# šŗ A.3.4 Choose Media
optionsList "$MEDIA" "šŗ Choose Media Packages" "CODECS AUDACIOUS VLC MPV CLEMENTINE RHYTHMBOX OBS_STUDIO MP3INFO YOUTUBE_DL"
# š A.3.5 Choose Browsers
optionsList "$BROWSERS" "š Choose Browsers" "CHROMIUM UNGOOGLEDCHROMIUM CHROME FIREFOX BRAVE VIVALDI EDGE LIBREWOLF GNOME_BROWSER"
# š¼ļø A.3.6 Choose PHOTO_EDITING
optionsList "$PHOTO_EDITING" "š¼ļø Choose Photo Editing" "GIMP INKSCAPE FIGMA"
# š» A.3.7 Choose Terminal
optionsList "$TERMINAL" "š» Choose TERMINAL" "BPYTOP HTOP SL CMATRIX LOLCAT NEOFETCH TREE TERMINATOR ZSH RETRO_TERM"
# š¾ A.3.8 Choose OTHER
optionsList "$OTHER" "š¾ Choose OTHER" "ROFI PLANK QT5CT FLATSEAL"
# B. Process
# B.1. Update the System
case "$UPDATE" in [yY] | [yY][eE][sS])
printf "\n\nš„\e[1;32m Update \e[0m\n"
sudo zypper ref
sudo zypper dup -y
printf "\nā
\e[1;32m Update\e[0m\n"
;;
*)
printf ""
;;
esac
# B.2. ADD_REPOSITORIES
# Flatpak
case "$FLATPAK" in [yY] | [yY][eE][sS])
printf "\n\nš„\e[1;32m Adding Flatpak\e[0m\n"
sudo zypper install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak override --filesystem=xdg-data/themes
printf "\nā
\e[1;32m flatpak\e[0m\n"
;;
*)
printf ""
;;
esac
# PACKMAN
case "$PACKMAN" in [yY] | [yY][eE][sS])
printf "\n\nš„\e[1;32m Adding PACKMAN\e[0m\n"
sudo zypper ar -cfp 90 https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/ packman
sudo zypper dup --from packman --allow-vendor-change
printf "\nā
\e[1;32m PACKMAN\e[0m\n"
;;
*)
printf ""
;;
esac
# B.3 Install Packages
# šµ B.3.2. Developer Tools
# š§© Install CODIUM
case "$CODIUM" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing CODIUM\e[0m\n"
sudo rpmkeys --import https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg
printf "[gitlab.com_paulcarroty_vscodium_repo]\nname=gitlab.com_paulcarroty_vscodium_repo\nbaseurl=https://download.vscodium.com/rpms/\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/-/raw/master/pub.gpg\nmetadata_expire=1h" | sudo tee -a /etc/zypp/repos.d/vscodium.repo
sudo zypper install -y codium
printf "\nā
\e[1;32m CODIUM Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install VSCODE
case "$VSCODE" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing VSCODE\e[0m\n"
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo zypper addrepo https://packages.microsoft.com/yumrepos/vscode vscode
sudo zypper ref
sudo zypper install -y code
printf "\nā
\e[1;32m VSCODE Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install CODEOSS
installPackageFlatpack "$CODEOSS" "com.visualstudio.code-oss"
# š§© Install SUBLIME
case "$SUBLIME" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing SUBLIME\e[0m\n"
sudo rpm -v --import https://download.sublimetext.com/sublimehq-rpm-pub.gpg
sudo zypper addrepo -g -f https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo
sudo zypper ref
sudo zypper install -y sublime-text
printf "\nā
\e[1;32m SUBLIME Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install PULSAR
installPackageFlatpack "$PULSAR" "dev.pulsar_edit.Pulsar"
# š§© Install VIM
installPackage "$VIM" "vim"
# š§© Install NEOVIM
installPackage "$NEOVIM" "neovim"
# š§© Install DOCKER
case "$DOCKER" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing DOCKER\e[0m\n"
sudo zypper update
sudo zypper install docker-compose
printf "\nā
\e[1;32m Docker Installed\e[0m\n"
sudo systemctl enable docker
sudo systemctl start docker
printf "\nā
\e[1;32m Enable Docker\e[0m\n"
sudo groupadd docker
sudo gpasswd -a $USER docker
printf "\nā
\e[1;32m Add user to Docker Group\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install NVM (NODE & NPM)
case "$NVM" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing NVM & Nodejs & NPM\e[0m\n"
sudo zypper install -y curl
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.bashrc
source ~/.zshrc
nvm install --lts
nvm install node
nvm ls
printf "\n\e[1;33m Node: " && node -v && printf "\e[0m\n\e[1;33m npm:" && npm -v && printf "\e[0m\n"
printf "\nā
\e[1;32m NODE NPM npm-check-updates Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install YARN
installPackage "$YARN" "yarn"
# š§© Install TYPESCRIPT
case "$TYPESCRIPT" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing Typescript\e[0m\n"
npm install -g typescript
printf "\nā
\e[1;32m Typescript Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install DOTNET
case "$DOTNET" in [yY] | [yY][eE][sS])
printf "\nš„ Add the Microsoft package signing key to your list of trusted keys and add the Microsoft package repository."
# From MS Docs
# sudo zypper install libicu
# sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
# wget https://packages.microsoft.com/config/opensuse/15/prod.repo
# sudo mv prod.repo /etc/zypp/repos.d/microsoft-prod.repo
# sudo chown root:root /etc/zypp/repos.d/microsoft-prod.repo
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo zypper addrepo --refresh https://packages.microsoft.com/config/opensuse/15/prod.repo
printf "\nš„ \e[1;32m Installing .NET\e[0m\n"
sudo zypper install -y dotnet-sdk-7.0
printf "\nā
\e[1;32m .NET Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install NodeCheckUpdate
case "$NodeCheckUpdate" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing npm Check Updates\e[0m\n"
npm install -g npm-check-updates
printf "\nā
\e[1;32m npm Check Updates Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© Install GIT
case "$GIT" in [yY] | [yY][eE][sS])
installPackage "$GIT" "git"
# Add GIT NAME
printf "\n\e[1;32m Add Your Git user name $GIT_NAME\e[0m\n"
git config --global user.name $GIT_NAME
printf "\n\e[1;34m " && git config user.name && printf "\e[0m\n"
# Add GIT EMAIL
printf "\n\e[1;32m Add Your Git user Email $GIT_EMAIL\e[0m\n"
git config --global user.email $GIT_EMAIL
printf "\n\e[1;34m " && git config user.email && printf "\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© GITHUB_DESKTOP
installPackageFlatpack "$GITHUB_DESKTOP" "io.github.shiftey.Desktop"
# š¬ A.3.3 Choose Messaging
# š§© SIGNAL
installPackageFlatpack "$SIGNAL" "org.signal.Signal"
# š§© WHATSAPP
# installPackageFlatpack "$WHATSAPP" "io.github.mimbrero.WhatsAppDesktop"
installPackage "$WHATSAPP" "whatsapp-for-linux"
# š B.3.3. Office
# š§© LIBREOFFICE
installPackage "$LIBREOFFICE" "libreoffice"
# š§© OKULAR
installPackage "$OKULAR" "okular"
# š§© CALIBRE
installPackage "$CALIBRE" calibre
# š§© FONTS
installPackage "$FONTS" "noto-fonts-emoji twemoji nerd-fonts noto-fonts-cjk unicode-emoji twemoji noto-fonts-emoji noto-fonts-emoji"
# š§© TODOIST
installPackageFlatpack "$TODOIST" "com.todoist.Todoist"
# š§ Mail
# š§© THUNDERBIRD
installPackage "$THUNDERBIRD" "thunderbird"
# š§© MAILSPRING
installPackageFlatpack "$MAILSPRING" "com.getmailspring.Mailspring"
# šµ B.3.4. Media
# š§© CODECS
case "$CODECS" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing CODECS\e[0m\n"
installPackage "$CODECS" "opi ffmpeg ffmpegthumbs"
opi codecs
printf "\nā
\e[1;32m CODECS Installed\e[0m\n"
;;
*)
printf ""
;;
esac
installPackage "$AUDACIOUS" "audacious audacious-plugins"
# š§© VLC
installPackage "$VLC" "vlc"
# š§© MPV
installPackage "$MPV" "mpv"
# š§© CLEMENTINE
installPackage "$CLEMENTINE" "clementine"
# š§© Rhythmbox
installPackage "$RHYTHMBOX" "rhythmbox"
# š§© OBS_STUDIO
installPackage "$OBS_STUDIO" "obs-studio"
# š§© MP3INFO
installPackage "$MP3INFO" "mp3info"
# š§© YOUTUBE_DL
installPackage "$YOUTUBE_DL" "youtube-dl yt-dlp"
# šµ B.3.5. Browsers
# š§© UNGOOGLEDCHROMIUM
installPackage "$UNGOOGLEDCHROMIUM" "ungoogled-chromium"
# š§© CHROMIUM
installPackage "$CHROMIUM" "chromium"
# š§© CHROME
case "$CHROME" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing Google Chrome\e[0m\n"
sudo zypper addrepo http://dl.google.com/linux/chrome/rpm/stable/x86_64 Google-Chrome
sudo zypper refresh
wget https://dl.google.com/linux/linux_signing_key.pub
sudo rpm --import linux_signing_key.pub
sudo zypper install -y --no-confirm google-chrome-stable
printf "\nā
\e[1;32m Google Chrome Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© FIREFOX
installPackage "$FIREFOX" "firefox"
# š§© BRAVE
case "$BRAVE" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m curl\e[0m\n"
sudo zypper install curl
printf "\nš„ \e[1;32m Add Brave Browsers Repos\e[0m\n"
sudo rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
sudo zypper addrepo https://brave-browser-rpm-release.s3.brave.com/brave-browser.repo
printf "\nš„ \e[1;32m Installing Brave Browsers\e[0m\n"
sudo zypper install brave-browser
printf "\nā
\e[1;32m Brave Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© LIBREWOLF
# installPackageFlatpack "$LIBREWOLF" "io.gitlab.librewolf-community"
case "$LIBREWOLF" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Add Librewolf Browsers Repos\e[0m\n"
sudo zypper addrepo https://rpm.librewolf.net/librewolf-repo.repo
printf "\nš„ \e[1;32m Installing Librewolf\e[0m\n"
sudo zypper refresh
sudo zypper install librewolf
printf "\nā
\e[1;32m Librewolf Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© EDGE
case "$EDGE" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Add MS Edge Stable Browsers Repos and GPG key\e[0m\n"
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
sudo zypper ar https://packages.microsoft.com/yumrepos/edge microsoft-edge-stable
printf "\nš„ \e[1;32m Installing MS Edge Stable\e[0m\n"
sudo zypper refresh
sudo zypper install microsoft-edge-stable
printf "\nā
\e[1;32m MS Edge Stable Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© VIVALDI
case "$VIVALDI" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Add Vivaldi Browsers Repos\e[0m\n"
sudo zypper ar https://repo.vivaldi.com/archive/vivaldi-suse.repo
printf "\nš„ \e[1;32m Installing Vivaldi\e[0m\n"
sudo zypper refresh
sudo zypper install vivaldi-stable
printf "\nā
\e[1;32m Vivaldi Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© GNOME_BROWSER
installPackage "$GNOME_BROWSER" "epiphany"
# š¼ļø A.3.6 PHOTO_EDITE
# š§© GIMP
installPackage "$GIMP" "gimp"
# š§© INKSCAPE
installPackage "$INKSCAPE" "inkscape"
# š§© FIGMA
installPackageFlatpack "$FIGMA" "io.github.Figma_Linux.figma_linux"
# š» TERMINAL
# š§© BPYTOP
installPackage "$BPYTOP" "bpytop"
# š§© HTOP
installPackage "$HTOP" "htop"
# š§© SL
installPackage "$SL" "sl"
# š§© CMATRIX
installPackage "$CMATRIX" "cmatrix"
case "$CMATRIX" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Add utilities repo\e[0m\n"
zypper addrepo https://download.opensuse.org/repositories/utilities/openSUSE_Factory/utilities.repo
printf "\nš„ \e[1;32m Install cmatrix \e[0m\n"
zypper refresh
zypper install cmatrix
printf "\nā
\e[1;32m cmatrix Installed\e[0m\n"
;;
*)
printf ""
;;
esac
# š§© LOLCAT
installPackage "$LOLCAT" "lolcat"
# š§© NEOFETCH
installPackage "$NEOFETCH" "neofetch"
# š§© TREE
installPackage "$TREE" "tree"
# š§© TERMINATOR
installPackage "$TERMINATOR" "terminator"
# š§© ZSH
installPackage "$ZSH" "zsh"
# š§© RETRO_TERM
installPackage "$RETRO_TERM" "cool-retro-term"
# š¾ OTHER
# š§© ROFI
installPackage "$ROFI" "rofi"
# š§© PLANK
installPackage "$PLANK" "plank"
# š§© QT5CT
case "$QT5CT" in [yY] | [yY][eE][sS])
printf "\nš„ \e[1;32m Installing qt5ct\e[0m\n"
sudo zypper install -y qt5ct
printf "\nā
\e[1;32m qt5ct Installed\e[0m\n"
printf "\n\e[1;32m Set environment variables in ~/.profile\e[0m\n"
echo 'export QT_QPA_PLATFORMTHEME="qt5ct"' >>~/.profile
;;
*)
printf ""
;;
esac
# š§© FLATSEAL
installPackageFlatpack "$FLATSEAL" "com.github.tchx84.Flatseal"