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) <noreply@anthropic.com>
This commit is contained in:
15
bootstrap.sh
15
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
|
||||
|
||||
Reference in New Issue
Block a user