#!/usr/bin/env bash

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

if [[ -x /usr/bin/dracut-rebuild ]]; then
	/usr/bin/dracut-rebuild "$@"
else
	echo -e "${_color_yellow}==> WARNING: 'dracut-rebuild' is deprecated.${_color_reset}" >&2
	echo -e "${_color_yellow}    Use 'limine-dracut' or 'limine-update' instead.${_color_reset}" >&2
	/usr/bin/limine-dracut "$@"
fi

