Move static service docs into services/<name>.md companion files

Applies the new write_readme companion-doc convention to ai-stack,
paintplus, and kyber-launcher: install-time-invariant content (usage
walkthroughs, service tables, troubleshooting) moves out of the .sh
heredocs into sibling services/<name>.md files, leaving only genuinely
install-specific content inline.

- services/paintplus.md: config/cloud/GPU/ai-stack-backend/update/Caddy
  sections, picked up automatically via write_readme's companion-doc
  support.
- services/ai-stack.md: roles, GPU switcher, service URLs, cloud LLM
  provider setup, update, Caddy. ai-stack.sh can't use write_readme
  directly (its POST-INSTALL-NOTES.md filename deliberately avoids
  colliding with the vendored app's own README.md in the same
  directory), so it appends the companion file manually.
- services/kyber-launcher.md: the full SWBF2 (2017) + Kyber walkthrough,
  moved out of the root README's "Gaming scripts" section (which now
  just points here). kyber-launcher.sh now calls write_readme to deploy
  it to ~/.local/share/kyber/README.md, fixing a stale in-script pointer
  to a README section that no longer exists.
This commit is contained in:
Claude
2026-08-04 12:34:37 +00:00
parent 52b4606ab5
commit d6092dde4c
7 changed files with 277 additions and 240 deletions
+17 -1
View File
@@ -223,7 +223,17 @@ EOF
echo " Paste that path into Kyber's SET GAME FOLDER dialog."
echo ""
echo " Troubleshooting — 'Origin Error: language not entitled':"
echo " See README.md Gaming section for the registry fix."
echo " See $INSTALL_DIR/README.md for the registry fix."
write_readme "$INSTALL_DIR" << MD
# Kyber Launcher
Native Linux AppImage client for SWBF2 (2017) community multiplayer.
- Launch: \`kyber\` (terminal) or search "Kyber Launcher" in the app menu
- AppImage: $APPIMAGE_PATH
- Update: re-run \`sudo ./setup.sh kyber-launcher\`
MD
}
# ── Standalone bootstrap ──────────────────────────────────────────────────────
@@ -248,6 +258,12 @@ if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
eval "$_var='${_r:-$_def}'"
}
write_readme() {
local _dir="$1"; shift
mkdir -p "$_dir"
cat > "$_dir/README.md"
}
ACTUAL_USER="${SUDO_USER:-$USER}"
ACTUAL_HOME=$(eval echo "~$ACTUAL_USER")
DRY_RUN="${DRY_RUN:-false}"