diff --git a/modules/akmods/akmods.sh b/modules/akmods/akmods.sh index 73914a6..6caa444 100644 --- a/modules/akmods/akmods.sh +++ b/modules/akmods/akmods.sh @@ -7,10 +7,16 @@ ENABLE_AKMODS_REPO() { INSTALL_RPM_FUSION() { if ! rpm -q rpmfusion-free-release &>/dev/null && ! rpm -q rpmfusion-nonfree-release &>/dev/null; then - rpm-ostree install \ - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm \ - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${OS_VERSION}.noarch.rpm - previously_not_installed_rpm_fusion=true + if command -v dnf5 &> /dev/null; then + dnf5 -y install \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${OS_VERSION}.noarch.rpm + elif command -v rpm-ostree &> /dev/null; then + rpm-ostree install \ + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-${OS_VERSION}.noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-${OS_VERSION}.noarch.rpm + fi + previously_not_installed_rpm_fusion=true else previously_not_installed_rpm_fusion=false fi @@ -18,7 +24,11 @@ fi UNINSTALL_RPM_FUSION() { if "${previously_not_installed_rpm_fusion}"; then - rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release + if command -v dnf5 &> /dev/null; then + dnf5 -y remove rpmfusion-free-release rpmfusion-nonfree-release + elif command -v rpm-ostree &> /dev/null; then + rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release + fi fi } diff --git a/modules/brew/brew.sh b/modules/brew/brew.sh index ba867aa..54e5376 100644 --- a/modules/brew/brew.sh +++ b/modules/brew/brew.sh @@ -11,15 +11,18 @@ fi # Check if gcc is installed & install it if it's not # (add VanillaOS package manager in the future when it gets supported) if ! command -v gcc &> /dev/null; then - if command -v rpm-ostree &> /dev/null; then + if command -v dnf5 &> /dev/null; then + echo "Installing \"gcc\" package, which is necessary for Brew to function" + dnf5 -y install gcc + elif command -v rpm-ostree &> /dev/null; then echo "Installing \"gcc\" package, which is necessary for Brew to function" rpm-ostree install gcc - else - echo "ERROR: \"gcc\" package could not be found" - echo " Brew depends on \"gcc\" in order to function" - echo " Please include \"gcc\" in the list of packages to install with the system package manager" - exit 1 fi +else + echo "ERROR: \"gcc\" package could not be found" + echo " Brew depends on \"gcc\" in order to function" + echo " Please include \"gcc\" in the list of packages to install with the system package manager" + exit 1 fi # Check if zstd is installed & install it if it's not diff --git a/modules/yafti/yafti.sh b/modules/yafti/yafti.sh index f307e28..a35fd8f 100644 --- a/modules/yafti/yafti.sh +++ b/modules/yafti/yafti.sh @@ -31,7 +31,11 @@ echo "Downloading repo file ${REPO_URL}" curl -fLs --create-dirs "${REPO_URL}" -o "${STAGING_REPO_PATH}" echo "Downloaded repo file ${REPO_URL}" -rpm-ostree install libadwaita yafti +if command -v dnf5 &> /dev/null; then + dnf5 -y install libadwaita yafti +elif command -v rpm-ostree &> /dev/null; then + rpm-ostree install libadwaita yafti +fi # Remove ublue COPR rm /etc/yum.repos.d/ublue-os-staging-fedora-*.repo