#!/usr/bin/env bash

if [[ $EUID -ne 0 ]]; then
	echo -e "\033[91m limine-scan must be run with root privileges.\033[0m" >&2
	exit 1
fi

# Check if limine-entry-tool exists
if ! command -v limine-entry-tool >/dev/null 2>&1; then
	echo -e "\033[91mError: limine-entry-tool not found.\033[0m" >&2
	exit 1
fi

# Run tools
limine-entry-tool --scan
if command -v limine-enroll-config >/dev/null 2>&1; then
	limine-enroll-config
fi
