From 55aca0ef4aece09bdfa85f2f96749dfcb601034c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 13 Jun 2026 17:03:27 +0200 Subject: feat: add check_nvchecker tool-availability guard --- mkhint | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mkhint b/mkhint index fad50fd..0eac057 100755 --- a/mkhint +++ b/mkhint @@ -125,6 +125,23 @@ check_wget() { fi } +# Validate nvchecker toolchain availability +check_nvchecker() { + local missing=() + command -v nvchecker &> /dev/null || missing+=("nvchecker") + command -v nvtake &> /dev/null || missing+=("nvtake") + command -v jq &> /dev/null || missing+=("jq") + if [[ ${#missing[@]} -gt 0 ]]; then + echo "Error: required tool(s) not installed: ${missing[*]}" >&2 + echo "Install nvchecker (provides nvchecker + nvtake) and jq." >&2 + exit 4 + fi + if [[ ! -f "$NVCHECKER_CONFIG" ]]; then + echo "Error: nvchecker config not found: $NVCHECKER_CONFIG" >&2 + exit 2 + fi +} + # download files download_file() { local url="$1" -- cgit v1.2.3