#!/usr/bin/env bash

readonly SCRIPT_NAME="limine-remove-entry"
export HOOK_CALLER="$SCRIPT_NAME"
export HOOK_CMDLINE="$*"

if ((EUID != 0)); then
	echo -e "\033[91m ${SCRIPT_NAME} must be run with root privileges.\033[0m" >&2
	exit 1
fi

if ! command -v limine-entry-tool &>/dev/null; then
	echo -e "ERROR: limine-entry-tool not found." >&2
	exit 1
fi

limine-entry-tool --remove-entry "${@}"
