#!/bin/sh # Zana web installer — https://zanaagent.app/install # # curl -fsSL https://zanaagent.app/install | sh # # Thin bootstrap: fetches the real (versioned, atomic, rollback-able) installer # and the prebuilt bundle, both hosted on this site, then hands off to it. set -eu BASE="https://zanaagent.app" command -v curl >/dev/null 2>&1 || { echo "zana: error: 'curl' is required" >&2; exit 1; } command -v bash >/dev/null 2>&1 || { echo "zana: error: 'bash' is required (macOS & Linux ship it)" >&2; exit 1; } tmp="$(mktemp -d "${TMPDIR:-/tmp}/zana-boot.XXXXXX")" trap 'rm -rf "$tmp"' EXIT INT TERM echo "==> Fetching Zana installer ..." curl -fsSL "$BASE/install-zana.sh" -o "$tmp/install-zana.sh" \ || { echo "zana: error: failed to download installer from $BASE/install-zana.sh" >&2; exit 1; } # Hand off: the real installer downloads the bundle tarball, provisions bun, # validates that the bundle runs, then installs it under a versioned layout. exec bash "$tmp/install-zana.sh" --package-url "$BASE/zana.tar.gz" "$@"