Files
ai-agent/worker/install-macos.sh
gabrielvidalandClaude Opus 5.5 0f8df74ad5 feat(worker): one installer for macOS + Linux, ai-agent-worker CLI, self-update
- worker/install.sh replaces install-macos.sh (kept as a shim for the old URL
  and the Macs' --update): launchd agent on macOS, systemd --user unit on Linux
  (make_service.py writes either).
- ai-agent-worker in ~/.local/bin: status | logs | pair | update | uninstall.
- install.sh auto-update <sha>: fetch that exact commit from Gitea, restart
  only when sidecar/cli/worker/notify changed, wait for /health to report it,
  roll back otherwise; state in update.json, log in update.log.
- sidecar/selfupdate.py: /health reports commit, updatable, update; POST
  /update starts the installer detached (only the installer's own clone).
- Every installer answer can come from WORKER_* so the hub can hand out one
  line; WORKER_BIND is only checked when auto-detected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 17:01:12 +02:00

13 lines
676 B
Bash
Executable File

#!/usr/bin/env bash
#
# install-macos.sh — the old name of worker/install.sh (macOS + Linux now).
# Kept so the old bootstrap URL and installs that call it by path — the Macs'
# `install-macos.sh --update` — still work: it hands over to install.sh.
set -euo pipefail
HERE="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" 2>/dev/null && pwd || true)"
if [[ -n "$HERE" && -f "$HERE/install.sh" && -f "$HERE/../sidecar/sidecar.py" ]]; then
exec bash "$HERE/install.sh" "$@"
fi
# `curl … | bash`: fetch the real installer, which bootstraps the clone.
exec bash <(curl -fsSL "https://git.gabvdl.xyz/gabrielvidal/ai-agent/raw/branch/${WORKER_REF:-main}/worker/install.sh") "$@"