diff --git a/tabs/system-setup/fedora/configure-dnf.sh b/tabs/system-setup/fedora/configure-dnf.sh new file mode 100644 index 000000000..af460545a --- /dev/null +++ b/tabs/system-setup/fedora/configure-dnf.sh @@ -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 diff --git a/tabs/system-setup/fedora/multimedia-codecs.sh b/tabs/system-setup/fedora/multimedia-codecs.sh new file mode 100644 index 000000000..a5db96a79 --- /dev/null +++ b/tabs/system-setup/fedora/multimedia-codecs.sh @@ -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 \ No newline at end of file diff --git a/tabs/system-setup/fedora/rpm-fusion-setup.sh b/tabs/system-setup/fedora/rpm-fusion-setup.sh index 52396d5df..3327f42b7 100644 --- a/tabs/system-setup/fedora/rpm-fusion-setup.sh +++ b/tabs/system-setup/fedora/rpm-fusion-setup.sh @@ -17,10 +17,11 @@ installRPMFusion() { fi ;; *) - echo "Unsupported distribution: $DTYPE" + printf "%b\n" "${RED}Unsupported distribution: $DTYPE${RC}" ;; esac } checkEnv +checkEscalationTool installRPMFusion diff --git a/tabs/system-setup/tab_data.toml b/tabs/system-setup/tab_data.toml index 6743da3c7..6f2200a69 100644 --- a/tabs/system-setup/tab_data.toml +++ b/tabs/system-setup/tab_data.toml @@ -32,6 +32,14 @@ values = ["dnf"] name = "RPM Fusion Setup" 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 Update" script = "system-update.sh"