diff options
| author | Danilo M. <danix@danix.xyz> | 2026-06-13 17:03:27 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-06-13 17:03:27 +0200 |
| commit | 55aca0ef4aece09bdfa85f2f96749dfcb601034c (patch) | |
| tree | c31177bfe63ced7f9eba4e5972fd51e5037ccd89 | |
| parent | 8559ce21005606e5be682b6d2dfa75d90601eaa2 (diff) | |
| download | mkhintfile-55aca0ef4aece09bdfa85f2f96749dfcb601034c.tar.gz mkhintfile-55aca0ef4aece09bdfa85f2f96749dfcb601034c.zip | |
feat: add check_nvchecker tool-availability guard
| -rwxr-xr-x | mkhint | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -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" |
