install.fairie/home/.chezmoiscripts/centos/run_onchange_before_05-upgrade.tmpl
Brian Zalewski 8ebce4eb0a Update 2 files
- /home/.chezmoiscripts/fedora/run_onchange_before_5-upgrade.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_05-upgrade.tmpl
2023-02-02 06:44:17 +00:00

26 lines
873 B
Bash

#!/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'
sudo dnf upgrade --refresh -y
### 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'
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'
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)'
fi