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