configs

configs
git clone https://git.prime8.dev/configs.git
Log | Files | Refs | README

commit 24ea802ac91e97dfa9f5a8ad87477433e1478134
parent c063f14294e0e21d7bf4f683fff52b77688b44cf
Author: Damian Myrda <damian@prime8.dev>
Date:   Sat, 31 Jan 2026 19:34:30 -0600

make local rpm installation generic and check if already installed

Diffstat:
Msetup.sh | 39+++++++++++++++++++++++++++++++--------
1 file changed, 31 insertions(+), 8 deletions(-)

diff --git a/setup.sh b/setup.sh @@ -144,14 +144,37 @@ if ! command -v nvr &>/dev/null; then pip install --user neovim-remote fi -# GDM themes -GDM_THEMES_RPM="$SCRIPT_DIR/rpms/gdm-themes-1.0-1.fc43.noarch.rpm" -if [ -f "$GDM_THEMES_RPM" ]; then - echo "Layering GDM themes via rpm-ostree..." - sudo rpm-ostree install --idempotent "$GDM_THEMES_RPM" - echo "GDM themes will be available after reboot" -else - echo "Warning: gdm-themes RPM not found at $GDM_THEMES_RPM" +# Install local RPMs +RPMS_DIR="$SCRIPT_DIR/rpms" +if [ -d "$RPMS_DIR" ]; then + echo "Checking local RPMs from $RPMS_DIR..." + + # Build list of RPMs to install + rpms_to_install=() + for rpm in "$RPMS_DIR"/*.rpm; do + [ -f "$rpm" ] || continue + + pkg_name=$(rpm -qp --queryformat '%{NAME}' "$rpm" 2>/dev/null) + if [ -z "$pkg_name" ]; then + echo "Warning: Could not read package name from $rpm" + continue + fi + + if rpm -q "$pkg_name" &>/dev/null; then + echo "Already installed: $pkg_name" + else + echo "Will install: $pkg_name" + rpms_to_install+=("$rpm") + fi + done + + # Install all at once if any found + if [ ${#rpms_to_install[@]} -gt 0 ]; then + echo "Installing ${#rpms_to_install[@]} RPM(s)..." + sudo rpm-ostree install --idempotent "${rpms_to_install[@]}" + else + echo "All local RPMs already installed" + fi fi # Symlink configs