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
This commit is contained in:
Angaddeep Singh 2024-09-19 07:04:27 +05:30 committed by GitHub
parent 533204902a
commit 97576d2087
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#!/bin/sh -e
. ../../common-script.sh
configureDNF() {
case $PACKAGER in
dnf)
printf "%b\n" ${YELLOW}"Configuring DNF...${RC}"
$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
echo "fastestmirror=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
echo "defaultyes=True" | $ESCALATION_TOOL tee -a /etc/dnf/dnf.conf > /dev/null
$ESCALATION_TOOL "$PACKAGER" -y install dnf-plugins-core
printf "%b\n" "${GREEN}DNF Configured Succesfully...${RC}"
;;
*)
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
;;
esac
}
checkEnv
checkEscalationTool
configureDNF

View File

@ -0,0 +1,26 @@
#!/bin/sh -e
. ../../common-script.sh
multimedia() {
case $PACKAGER in
dnf)
if [ -e /etc/yum.repos.d/rpmfusion-free.repo ] && [ -e /etc/yum.repos.d/rpmfusion-nonfree.repo ]; then
printf "%b\n" "${YELLOW}Installing Multimedia Codecs...${RC}"
$ESCALATION_TOOL "$PACKAGER" swap ffmpeg-free ffmpeg --allowerasing -y
$ESCALATION_TOOL "$PACKAGER" update @multimedia --setopt="install_weak_deps=False" --exclude=PackageKit-gstreamer-plugin -y
$ESCALATION_TOOL "$PACKAGER" update @sound-and-video -y
printf "%b\n" "${GREEN}Multimedia Codecs Installed...${RC}"
else
printf "%b\n" "${RED}RPM Fusion repositories not found. Please set up RPM Fusion first!${RC}"
fi
;;
*)
printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}"
;;
esac
}
checkEnv
checkEscalationTool
multimedia

View File

@ -23,4 +23,5 @@ installRPMFusion() {
}
checkEnv
checkEscalationTool
installRPMFusion

View File

@ -36,6 +36,14 @@ name = "RPM Fusion Setup"
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/"
script = "fedora/rpm-fusion-setup.sh"
[[data.entries]]
name = "Configure DNF"
script = "fedora/configure-dnf.sh"
[[data.entries]]
name = "Multimedia Setup"
script = "fedora/multimedia-codecs.sh"
[[data]]
name = "Full System Cleanup"
script = "system-cleanup.sh"