#!/bin/sh
set -eu
case "$(dpkg --print-architecture)" in
  amd64) target=x86_64-efi ;;
  arm64) target=arm64-efi ;;
  *) echo 'Unsupported AnduinOS EFI architecture' >&2; exit 64 ;;
esac
case "${*:-}" in
  ''|"--target=$target") exec /usr/libexec/anduinos-grub-update deploy ;;
  *) echo 'AnduinOS boot deployment requires the configured local EFI target' >&2; exit 64 ;;
esac
