#!/usr/bin/env bash
set -euo pipefail

case "${1:-}" in
  --uninstall|-h|--help) ;;
  *) set -- --quickstart "$@" ;;
esac

printf '%s
' \
  'Belay alpha notice: this Apple Silicon build is unsigned and unnotarized.' \
  'The installer still verifies the release checksum and packaged checksums.' >&2

curl --fail --silent --show-error --location \
  'https://github.com/DoplexLabs/belay/releases/download/v0.0.1-alpha.8/install.sh' | \
  BELAY_VERSION='0.0.1-alpha.8' BELAY_INSTALL_ALLOW_UNTRUSTED=1 bash -s -- "$@"
