Update 2 files

- /home/.chezmoiscripts/fedora/run_onchange_before_5-upgrade.tmpl
- /home/.chezmoiscripts/centos/run_onchange_before_05-upgrade.tmpl
This commit is contained in:
Brian Zalewski 2023-02-02 06:41:38 +00:00
parent db7902cd99
commit 4d86c79494
2 changed files with 32 additions and 3 deletions

View file

@ -5,7 +5,7 @@
### Upgrade system ### Upgrade system
logg info 'Upgrade system' logg info 'Upgrade system'
sudo dnf upgrade -y --refresh sudo dnf upgrade --refresh
### Enable CRB ### Enable CRB
logg info 'Ensure the CRB repository is activated' logg info 'Ensure the CRB repository is activated'
@ -14,14 +14,12 @@ sudo dnf config-manager --set-enabled crb
### Add EPEL ### Add EPEL
if ! dnf repolist | grep 'epel ' > /dev/null; then if ! dnf repolist | grep 'epel ' > /dev/null; then
logg info 'Adding the EPEL repository' 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" sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-${VERSION}.noarch.rpm"
fi fi
### Add EPEL Next ### Add EPEL Next
if ! dnf repolist | grep 'epel-next' > /dev/null; then if ! dnf repolist | grep 'epel-next' > /dev/null; then
logg info 'Adding the EPEL Next repository' 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" sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-${VERSION}.noarch.rpm"
else else
logg info 'EPEL Next repository already enabled (EPEL compatibility for CentOS)' logg info 'EPEL Next repository already enabled (EPEL compatibility for CentOS)'

View file

@ -0,0 +1,31 @@
#!/usr/bin/env bash
{{ includeTemplate "universal/logg-before" }}
### Upgrade system
logg info 'Upgrade system'
sudo dnf upgrade --refresh
# https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/
# TODO - Optional: Look into using Fedora's upgrade system described in the link above
# sudo dnf install dnf-plugin-system-upgrade
### Add RPM Fusion Free repository
if ! dnf repolist | grep 'rpmfusion-free' > /dev/null; then
logg info 'Adding RPM-Fusion Free repository for Fedora'
sudo dnf install -y "https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm"
fi
### Add RPM Fusion Non-Free repository
if ! dnf repolist | grep 'rpmfusion-nonfree' > /dev/null; then
logg info 'Adding RPM-Fusion Non-Free repository for Fedora'
sudo dnf install -y "https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
fi
### Add Appstream data from the RPM Fusion repositories
if command -v gnome-shell > /dev/null; then
logg info 'Adding Appstream data from the RPM-Fusion repositories'
sudo dnf group update -y core
else
logg warn 'Skipping installation of Appstream data because GNOME is not installed'
fi