linutil/tabs/system-setup/fedora/multimedia-codecs.sh

26 lines
972 B
Bash
Raw Normal View History

#!/bin/sh -e
. ../../common-script.sh
multimedia() {
2024-09-19 19:05:36 +01:00
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}"
2024-09-19 19:05:36 +01:00
"$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