-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEnable-RpmFusion.bash
More file actions
executable file
·34 lines (29 loc) · 1.4 KB
/
Enable-RpmFusion.bash
File metadata and controls
executable file
·34 lines (29 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Importing functions run_as_root, get_os_type and install_rpm_package
source RunAsRoot.bash
source OsInfo.bash
source RpmPackageManager.bash
# Running as root
run_as_root
# Enabling Fedora Epel
bash Enable-FedoraEpel.bash
# Installing RPM Fusion
if [ "$(get_os_type)" == "rhel" ] || [ "$(get_os_type)" == "centos" ] || [ "$(get_os_type)" == "almalinux" ] || [ "$(get_os_type)" == "ol" ]; then
install_rpm_package --nogpgcheck "https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-$(rpm -E %rhel).noarch.rpm"
install_rpm_package --nogpgcheck "https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-$(rpm -E %rhel).noarch.rpm"
elif [ "$(get_os_type)" == "fedora" ]; then
install_rpm_package "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm"
install_rpm_package "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
fi
install_rpm_package rpmfusion-free-release-tainted
install_rpm_package rpmfusion-nonfree-release-tainted
# Using openh264 library
if [ "$(get_os_type)" == "fedora" ]; then
if [ "$(command -v dnf4)" ]; then
dnf4 config-manager --enable --assumeyes fedora-cisco-openh264
elif [ "$(command -v dnf)" ]; then
dnf config-manager --enable --assumeyes fedora-cisco-openh264
else
sed -i 's/enabled=0/enabled=1/' /etc/yum.repos.d/fedora-cisco-openh264.repo
fi
fi