panama update: one command, no questions, and no gap it cannot see

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 07:22:12 -04:00
parent 8105849151
commit beed44dd87
7 changed files with 894 additions and 99 deletions
+15 -10
View File
@@ -232,10 +232,10 @@ if [[ -s /etc/profile.d/nvm.sh ]]; then
source /etc/profile.d/nvm.sh
if nvm install --lts >/dev/null 2>&1; then
nvm alias default 'lts/*' >/dev/null 2>&1 || true
npm install -g pnpm >/dev/null 2>&1 || log "pnpm did not install"
npm install -g pnpm >/dev/null 2>&1 || { log "pnpm did not install"; softly_failed+=("pnpm"); }
log "Node $(node --version 2>/dev/null) with pnpm $(pnpm --version 2>/dev/null)"
else
log "nvm could not install Node; skipping"
log "nvm could not install Node; skipping"; softly_failed+=("Node (nvm)")
fi
set -u
else
@@ -265,7 +265,7 @@ if [[ -x "$HOME/.bun/bin/bun" ]]; then
log "Bun already installed at \"$HOME/.bun/bin/bun\""
else
log "Installing Bun via curl..."
curl -fsSL https://bun.sh/install | bash > /dev/null 2>&1 || log "Bun install failed; skipping"
curl -fsSL https://bun.sh/install | bash > /dev/null 2>&1 || { log "Bun install failed; skipping"; softly_failed+=("Bun"); }
fi
# Claude Code: Anthropic's CLI. The official installer keeps itself updated
@@ -274,7 +274,7 @@ if command -v claude >/dev/null 2>&1; then
log "Claude Code already installed at \"$(command -v claude)\""
else
log "Installing Claude Code via the official installer..."
curl -fsSL https://claude.ai/install.sh | bash > /dev/null 2>&1 || log "Claude Code install failed; skipping"
curl -fsSL https://claude.ai/install.sh | bash > /dev/null 2>&1 || { log "Claude Code install failed; skipping"; softly_failed+=("Claude Code"); }
fi
# Claude Desktop: Anthropic ships macOS and Windows only, so this is a community
@@ -307,7 +307,7 @@ else
fi
log "Installing Claude Desktop..."
sudo dnf install -y claude-desktop-extra > /dev/null \
|| log "Claude Desktop install failed; skipping"
|| { log "Claude Desktop install failed; skipping"; softly_failed+=("Claude Desktop"); }
fi
# RustDesk: remote desktop. The flatpak cannot register the root-owned system
@@ -328,9 +328,9 @@ else
log "Installing RustDesk from $rustdesk_url"
# The RPM ships rustdesk.service already enabled, which is what provides
# unattended access; Panama deliberately does not start it a second time.
sudo dnf install -y "$rustdesk_url" > /dev/null || log "RustDesk install failed; skipping"
sudo dnf install -y "$rustdesk_url" > /dev/null || { log "RustDesk install failed; skipping"; softly_failed+=("RustDesk"); }
else
log "Could not resolve a RustDesk release; skipping"
log "Could not resolve a RustDesk release; skipping"; softly_failed+=("RustDesk")
fi
fi
@@ -388,12 +388,12 @@ install_extra_category() {
if [[ -n "${dnf_packages// /}" ]]; then
log "Installing $name: $dnf_packages"
sudo dnf install -y $dnf_packages > /dev/null || log "Some $name packages did not install"
sudo dnf install -y $dnf_packages > /dev/null || { log "Some $name packages did not install"; softly_failed+=("$name packages"); }
fi
if [[ -n "${flatpak_ids// /}" ]]; then
log "Installing $name flatpaks: $flatpak_ids"
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo > /dev/null
sudo flatpak install -y flathub $flatpak_ids > /dev/null || log "Some $name flatpaks did not install"
sudo flatpak install -y flathub $flatpak_ids > /dev/null || { log "Some $name flatpaks did not install"; softly_failed+=("$name flatpaks"); }
fi
}
@@ -416,5 +416,10 @@ done
if (( ${#softly_failed[@]} > 0 )); then
log "Installed, but these were stepped over:"
printf ' - %s\n' "${softly_failed[@]}"
log "None of them stops the desktop. Re-run this stage to try them again."
log "None of them stops the desktop, but this run is not recorded as"
log "complete, so the next 'panama update' tries them again."
# A step that did not complete has not happened. Exiting non-zero is what
# keeps ./install from stamping the packages hash over the gaps -- stamped,
# they would never be retried (the hash-skip would say nothing changed).
exit 1
fi