-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOpenSUSE_Installation.sh
172 lines (144 loc) · 6.87 KB
/
OpenSUSE_Installation.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
#!/bin/bash
############################################################
# OpenSUSE Installation Script
#
# ----------------------------------------------------------
# ATTENTION!
# This script can be run in a single line from your shell!
# Simply run the following in the Terminal:
#
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/DAK404/OpenSUSE-Setup-Scripts/main/OpenSUSE_Installation.sh)"
#
# ----------------------------------------------------------
#
# --- CHANGELOG ---
#
# 1.6 (12-November-2024):
# * Add logic to install gaming software
# (Steam, lutris, Wine, DXVK)
# * Remove installation logic for Mozilla Thunderbird
#
# 1.5 (05-November-2024):
# * Revert Edge repository to microsoft-edge
# (Prevents repo duplication under different name)
#
# 1.4 (22-August-2024):
# * Install codecs from the main repository
# * Disable the addition of Packman and installation
# of codecs from Packman repository
# * NOTE: Please enable it if you want to use packages
# from Packman!
#
# 1.3 (01-August-2024):
# * GPG keys are now auto imported with repository
# * Add quotes to repo aliases
# * Fix packman -> Packman
# * Import keys for GitHub Desktop and Microsoft
# since they caused errors for me.
# * Move personalization commands to personalize.sh
# * NOTE:
# This script no longer has external dependencies,
# therefore, like the EasyEffects installation,
# this too can be done over the internet directly.
# * Add '\n' to printf statement for autoremove alias
#
# 1.2 (28-July-2024):
# * Add a new section to import repository keys first
# and then install the necessary packages. Avoids
# the script from erroring out and skip the packages
# that requires installation.
# * Move OpenRGB tools installation to OpenRGB.sh
# (Makes more sense if the user does not want OpenRGB
# to be installed on their system)
# * Add '-y' flag to automate installation of
# GitHubDesktop and git
# * Cleared up the logic to import the GitHub Desktop
# repository and the GPG Key.
#
# 1.1 (23-July-2024):
# * Add the VLC repository
# * Make the script install VLC from the VideoLAN repos
# * Add tags to echo statements to show the status of
# an action.
# * Disable font installation logic.
# * Disable repository Packman after installation of
# codecs. This will prevent vendor change to Packman.
# * Reorder logic to check updates after importing keys
# and adding relevant repositories.
#
# 1.0 (19-July-2024):
# * Improve comments
# * Add p11-kit-server
# * Segregated each step of installation
# * Fix the OpenRGB package name
# * Automated Easyeffects preset installation
# * echo each stage of script
############################################################
echo "--- OpenSUSE Installation Script ---"
# ---- ADD REPOSITORIES ---- #
echo "[ INFORMATION ] Adding Repository: Microsoft"
# Add Microsoft Repositories
sudo rpm --import 'https://packages.microsoft.com/keys/microsoft.asc'
sudo zypper --gpg-auto-import-keys addrepo --refresh 'https://packages.microsoft.com/yumrepos/edge' 'microsoft-edge'
sudo zypper --gpg-auto-import-keys addrepo --refresh 'https://packages.microsoft.com/yumrepos/vscode' 'Visual Studio Code'
echo "[ INFORMATION ] Adding Repository: GitHub"
# Add GitHub Desktop for Linux Repository
sudo rpm --import 'https://rpm.packages.shiftkey.dev/gpg.key'
sudo zypper --gpg-auto-import-keys addrepo --refresh 'https://rpm.packages.shiftkey.dev/rpm/' 'GitHub Desktop'
echo "[ INFORMATION ] Adding Repository: VLC"
# Add VLC Repository
sudo zypper --gpg-auto-import-keys addrepo --refresh 'https://download.videolan.org/pub/vlc/SuSE/Tumbleweed/' 'VLC'
# --- Install Codecs from Packman --- #
#echo "[ INFORMATION ] Adding Repository: Packman"
# Add OpenSUSE Packman repository
#sudo zypper --gpg-auto-import-keys addrepo --refresh 'https://ftp.gwdg.de/pub/linux/misc/packman/suse/openSUSE_Tumbleweed/' 'Packman'
echo "[ INFORMATION ] Refreshing Repositories; Importing GPG Keys..."
sudo zypper --gpg-auto-import-keys refresh
echo "[ ATTENTION ] Installing: Codecs"
# Install the codecs required for multimedia playback from the main repository
sudo zypper install -y ffmpeg gstreamer-plugins-{good,bad,ugly,libav} libavcodec vlc-codecs
# NOTE: Not using opi here since it will switch ALL packages that exist in the Packman repository to use Packman.
# We manually specify to install codecs from Packman repository so all other programs are not switched to Packman.
# sudo zypper install -y --allow-vendor-change --from Packman ffmpeg gstreamer-plugins-{good,bad,ugly,libav} libavcodec vlc-codecs
# Disable Packman repository
#
# NOTE
# You may want to comment this line out if you want updates from Packman.
# sudo zypper mr -d Packman
# ---- INSTALL SOFTWARE ---- #
# Begin package installation
echo "[ ATTENTION ] Installing: KDE Utilities"
# --- Install KDE Utilities --- #
sudo zypper install -y kdeconnect-kde krita kdenlive partitionmanager kvantum-manager
echo "[ ATTENTION ] Installing: Discord"
# --- Install Discord IM --- #
sudo zypper install -y discord libdiscord-rpc*
echo "[ ATTENTION ] Installing: Microsoft Edge and VS Code"
# --- Install Microsoft Edge and VS Code --- #
sudo zypper install -y microsoft-edge-stable code
echo "[ ATTENTION ] Installing: GitHub Desktop & Git"
# --- Install GitHub Desktop and Git --- #
sudo zypper install -y github-desktop git
echo "[ ATTENTION ] Installing: System Utilities"
# --- Install System Level Utilities --- #
sudo zypper install -y fde-tools bleachbit easyeffects libdbusmenu-glib4 p11-kit-server
echo "[ ATTENTION ] Installing: Gaming Components"
# --- Install Gaming Software and Utilities --- #
sudo zypper install -y dxvk wine lutris steam
echo "[ ATTENTION ] Installing: VLC"
# --- Install VLC from VideoLAN Repositories --- #
sudo zypper dup -y --from VLC --allow-vendor-change
# Check for OpenSUSE Tumbleweed updates
echo "[ INFORMATION ] Checking for Updates..."
sudo zypper dup -y
echo "[ ATTENTION ] Installing: EasyEffects Presets"
# Install EasyEffects presets
echo 1 | bash -c "$(curl -fsSL https://raw.githubusercontent.com/JackHack96/PulseEffects-Presets/master/install.sh)"
# ---- CLEANUP ---- #
printf "[ INFORMATION ] Installing: \'autoremove\' command\n"
# Add "autoremove" command to remove any unneeded packages.
echo "alias autoremove=\"sudo zypper packages --unneeded | awk -F'|' 'NR==0 || NR==1 || NR==2 || NR==3 || NR==4 {next} {print $3}' | grep -v Name | sudo xargs zypper remove -y --clean-deps >> ~/Cleanup.log\"" | sudo tee -a /etc/bash.bashrc.local
echo "[ INFORMATION ] Cleaning Up..."
# Run the command to autoremove packages
sudo zypper packages --unneeded | awk -F'|' 'NR==0 || NR==1 || NR==2 || NR==3 || NR==4 {next} {print $3}' | grep -v Name | sudo xargs zypper remove -y --clean-deps >> ~/Cleanup.log
echo "End Of Script. It is recommended to reboot to apply changes."