#!/usr/bin/env bash

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

# Check if limine-install exists
if command -v limine-install &>/dev/null; then
    limine-install --no-efi-register
else
    echo "limine-install not found."
fi

# Check if limine-dracut exists and is executable
if command -v limine-dracut &>/dev/null; then
    limine-dracut
else
    echo "limine-dracut not found."
fi
