#!/usr/bin/env bash

readonly SCRIPT_NAME="limine-snapper-info"

_color_reset=""
_color_red=""
colors="$(tput colors 2>/dev/null || echo 0)"
if ((colors >= 8)); then
	_color_reset="\033[0m"
	_color_red="\033[1;31m"
fi

error_msg() {
	echo -e "${_color_red}ERROR: $1${_color_reset} ${2:-}" >&2
}

### Check if the script is being run with root privileges
if [ "$EUID" -ne 0 ]; then
	error_msg "${SCRIPT_NAME} must be run with root privileges."
	exit 1
fi

/usr/lib/limine/limine-snapper-sync --info
