Fix issues with fedora (#589)

Co-authored-by: nnyyxxxx <nnyyxxxx@users.noreply.github.com>
This commit is contained in:
Nyx 2024-09-22 12:05:23 -04:00 committed by GitHub
parent 3c8adcf370
commit 3fb4876d9e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@
checkRepo() {
REPO_ID="rpmfusion-nonfree-nvidia-driver"
if [ $(dnf repolist enabled 2>/dev/null | grep "$REPO_ID" | wc -l) -gt 0 ]; then
if [ "$(dnf repolist enabled 2>/dev/null | grep -c "$REPO_ID")" -gt 0 ]; then
printf "%b\n" "${GREEN}Nvidia non-free repository is already enabled.${RC}"
else
printf "%b\n" "${YELLOW}Nvidia non-free repository is not enabled. Enabling now...${RC}"
@ -24,7 +24,7 @@ checkRepo() {
"$ESCALATION_TOOL" dnf makecache
# Verify if the repository is enabled
if [ $(dnf repolist enabled 2>/dev/null | grep "$REPO_ID" | wc -l) -gt 0 ]; then
if [ "$(dnf repolist enabled 2>/dev/null | grep -c "$REPO_ID")" -gt 0 ]; then
printf "%b\n" "${GREEN}Nvidia non-free repository is now enabled...${RC}"
else
printf "%b\n" "${RED}Failed to enable nvidia non-free repository...${RC}"

View File

@ -9,7 +9,7 @@ installRPMFusion() {
dnf)
if [ ! -e /etc/yum.repos.d/rpmfusion-free.repo ] || [ ! -e /etc/yum.repos.d/rpmfusion-nonfree.repo ]; then
printf "%b\n" "${YELLOW}Installing RPM Fusion...${RC}"
"$ESCALATION_TOOL" "$PACKAGER" install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
"$ESCALATION_TOOL" "$PACKAGER" install "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora)".noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm
"$ESCALATION_TOOL" "$PACKAGER" config-manager --enable fedora-cisco-openh264
printf "%b\n" "${GREEN}RPM Fusion installed${RC}"
else

View File

@ -6,7 +6,7 @@
configureVirtualization() {
case "$PACKAGER" in
dnf)
printf "%b\n" ${YELLOW}"Installing virtualization tools...${RC}"
printf "%b\n" "${YELLOW}Installing virtualization tools...${RC}"
"$ESCALATION_TOOL" "$PACKAGER" install -y @virtualization
printf "%b\n" "${GREEN}Installed virtualization tools...${RC}"
;;