Skip to content

Commit 97576d2

Browse files
author
Angaddeep Singh
authored
Added DNF configuration and Multimedia Support for fedora and other Redhat Distros (#438)
* First commit * Small enhancements * Update configure-dnf.sh * update * Update configure-dnf.sh * update * Update multimedia-codecs.sh * Update multimedia-codecs.sh
1 parent 5332049 commit 97576d2

File tree

4 files changed

+58
-0
lines changed

4 files changed

+58
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh -e
2+
3+
. ../../common-script.sh
4+
5+
configureDNF() {
6+
case $PACKAGER in
7+
dnf)
8+
printf "%b\n" ${YELLOW}"Configuring DNF...${RC}"
9+
$ESCALATION_TOOL sed -i '/^max_parallel_downloads=/c\max_parallel_downloads=10' /etc/dnf/dnf.conf || echo 'max_parallel_downloads=10' >> /etc/dnf/dnf.conf
10+
echo "fastestmirror=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
11+
echo "defaultyes=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
12+
$ESCALATION_TOOL "$PACKAGER" -y install dnf-plugins-core
13+
printf "%b\n" "${GREEN}DNF Configured Succesfully...${RC}"
14+
;;
15+
*)
16+
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
17+
;;
18+
esac
19+
}
20+
21+
checkEnv
22+
checkEscalationTool
23+
configureDNF
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/sh -e
2+
3+
. ../../common-script.sh
4+
5+
multimedia() {
6+
case $PACKAGER in
7+
dnf)
8+
if [ -e /etc/yum.repos.d/rpmfusion-free.repo ] && [ -e /etc/yum.repos.d/rpmfusion-nonfree.repo ]; then
9+
printf "%b\n" "${YELLOW}Installing Multimedia Codecs...${RC}"
10+
$ESCALATION_TOOL "$PACKAGER" swap ffmpeg-free ffmpeg --allowerasing -y
11+
$ESCALATION_TOOL "$PACKAGER" update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
12+
$ESCALATION_TOOL "$PACKAGER" update @sound-and-video -y
13+
printf "%b\n" "${GREEN}Multimedia Codecs Installed...${RC}"
14+
else
15+
printf "%b\n" "${RED}RPM Fusion repositories not found. Please set up RPM Fusion first!${RC}"
16+
fi
17+
;;
18+
*)
19+
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
20+
;;
21+
esac
22+
}
23+
24+
checkEnv
25+
checkEscalationTool
26+
multimedia

tabs/system-setup/fedora/rpm-fusion-setup.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,5 @@ installRPMFusion() {
2323
}
2424

2525
checkEnv
26+
checkEscalationTool
2627
installRPMFusion

tabs/system-setup/tab_data.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ name = "RPM Fusion Setup"
3636
description = "RPM Fusion provides software that the Fedora Project or Red Hat doesn't want to ship.\nThat software is provided as precompiled RPMs for all current Fedora versions and current Red Hat Enterprise Linux or clones versions; you can use the RPM Fusion repositories with tools like yum and PackageKit.\nFor more information visit: https://rpmfusion.org/"
3737
script = "fedora/rpm-fusion-setup.sh"
3838

39+
[[data.entries]]
40+
name = "Configure DNF"
41+
script = "fedora/configure-dnf.sh"
42+
43+
[[data.entries]]
44+
name = "Multimedia Setup"
45+
script = "fedora/multimedia-codecs.sh"
46+
3947
[[data]]
4048
name = "Full System Cleanup"
4149
script = "system-cleanup.sh"

0 commit comments

Comments
 (0)