#!/bin/sh
# Caesura demo installer: fetch the boot shim; it updates the demo from the signed release.
set -eu
BASE="https://pub-6270514e1f484efbb34d8d539439fed4.r2.dev"
DIR="${CAESURA_DEMO_DIR:-$HOME/.local/share/caesura/demo}"
mkdir -p "$DIR"
printf 'Installing Caesura demo into %s\n' "$DIR"
curl -fL "$BASE/demo/caesura-boot" -o "$DIR/caesura-boot"
chmod +x "$DIR/caesura-boot"
exec "$DIR/caesura-boot" "$@"
