aboutsummaryrefslogtreecommitdiffstats
path: root/mkhint
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-13 17:03:27 +0200
committerDanilo M. <danix@danix.xyz>2026-06-13 17:03:27 +0200
commit55aca0ef4aece09bdfa85f2f96749dfcb601034c (patch)
treec31177bfe63ced7f9eba4e5972fd51e5037ccd89 /mkhint
parent8559ce21005606e5be682b6d2dfa75d90601eaa2 (diff)
downloadmkhintfile-55aca0ef4aece09bdfa85f2f96749dfcb601034c.tar.gz
mkhintfile-55aca0ef4aece09bdfa85f2f96749dfcb601034c.zip
feat: add check_nvchecker tool-availability guard
Diffstat (limited to 'mkhint')
-rwxr-xr-xmkhint17
1 files changed, 17 insertions, 0 deletions
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"