From a7d2a7a08cfb7448750b8044534a651245339653 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 20 May 2026 17:12:13 +0200 Subject: [PATCH] bootstrap.sh: emit dnf install hint on Fedora/RHEL clients Was apt-only on Linux; republic-laptop is Nobara so installs use dnf and yaml is python3-pyyaml (not python3-yaml). Co-Authored-By: Claude Opus 4.7 (1M context) --- bootstrap.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index a3ccffe..37b10e0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -114,7 +114,6 @@ fi if [ "${#missing[@]}" -gt 0 ]; then echo "missing required tools: ${missing[*]}" >&2 if [ "$OS" = "Darwin" ]; then - # Translate Debian package names to brew/pip equivalents. brew_list=() for m in "${missing[@]}"; do case "$m" in @@ -123,8 +122,20 @@ if [ "${#missing[@]}" -gt 0 ]; then esac done [ "${#brew_list[@]}" -gt 0 ] && echo " brew install ${brew_list[*]}" >&2 + elif command -v dnf >/dev/null 2>&1; then + # Fedora/RHEL/Nobara: python yaml package is python3-pyyaml. + dnf_list=() + for m in "${missing[@]}"; do + case "$m" in + python3-yaml) dnf_list+=("python3-pyyaml") ;; + *) dnf_list+=("$m") ;; + esac + done + echo " sudo dnf install -y ${dnf_list[*]}" >&2 + elif command -v apt >/dev/null 2>&1; then + echo " sudo apt install -y ${missing[*]}" >&2 else - echo " apt install -y ${missing[*]}" >&2 + echo " install with your package manager: ${missing[*]}" >&2 fi exit 1 fi