-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfedorapostinstall.sh
58 lines (47 loc) · 1.73 KB
/
fedorapostinstall.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
#!/bin/sh
#
# Fedora Post Install
#
# Description: A shell script for enabling RPMFusion repositories, installing multimedia codecs and enabling flatpak on Fedora.
#
# The following terminal commands are taken from https://rpmfusion.org/Configuration/ and https://flatpak.org/setup/Fedora/
echo Fedora Post Install && echo Script Started.
enable_rpmfusion_repo()
{
# To enable access to both the free and the nonfree repository use the following command:
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
}
install_mulmedia_tainted_repo()
{
# To install appstream-data:
sudo dnf groupupdate core -y
# To install the complements multimedia packages needed by gstreamer enabled applications:
sudo dnf groupupdate multimedia --setop="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
# To install the sound-and-video complement packages needed by some applications:
sudo dnf groupupdate sound-and-video -y
# To enable tainted repositories
sudo dnf install rpmfusion-free-release-tainted -y
sudo dnf install rpmfusion-nonfree-release-tainted -y
}
enable_flatpak_repo()
{
# To enable flatpak repository
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
}
error()
{
# Error message
echo ERROR! Run Script Again. && exit 0
}
success()
{
#Success message
echo Script Completed. && echo Success! && sleep 1
}
cleanup()
{
# Delete script, close terminal and exit
rm -r fedorapostinstall.sh ; kill -9 $PPID ; exit 0
}
enable_rpmfusion_repo && install_mulmedia_tainted_repo && enable_flatpak_repo && success && cleanup || error