2023-01-30 21:43:15 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
# Source: https://www.linuxcapable.com/how-to-install-epel-on-centos-stream/
|
|
|
|
|
|
|
|
{{ includeTemplate "universal/logg-before" }}
|
|
|
|
|
|
|
|
### Upgrade system
|
|
|
|
logg info 'Upgrade system'
|
2023-01-30 22:02:08 -08:00
|
|
|
sudo dnf upgrade -y --refresh
|
2023-01-30 21:43:15 -08:00
|
|
|
|
|
|
|
### Enable CRB
|
|
|
|
logg info 'Ensure the CRB repository is activated'
|
|
|
|
sudo dnf config-manager --set-enabled crb
|
|
|
|
|
|
|
|
### Add EPEL
|
|
|
|
if ! dnf repolist | grep 'epel ' > /dev/null; then
|
|
|
|
logg info 'Adding the EPEL repository'
|
|
|
|
. /etc/os-release
|
|
|
|
sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION}.noarch.rpm"
|
|
|
|
fi
|
|
|
|
|
|
|
|
### Add EPEL Next
|
|
|
|
if ! dnf repolist | grep 'epel-next' > /dev/null; then
|
|
|
|
logg info 'Adding the EPEL Next repository'
|
|
|
|
. /etc/os-release
|
|
|
|
sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-${VERSION}.noarch.rpm"
|
|
|
|
else
|
|
|
|
logg info 'EPEL Next repository already enabled (EPEL compatibility for CentOS)'
|
2023-01-30 21:47:48 -08:00
|
|
|
fi
|