From 84904cb9dba93b7466e7847efdf6dfa48541a31a Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 7 Jul 2026 18:34:00 +0200 Subject: feat: fetch_manifest + fake-wget manifest fixture support Co-Authored-By: Claude Opus 4.8 --- mkhint | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mkhint') diff --git a/mkhint b/mkhint index 2a18abc..544bdee 100755 --- a/mkhint +++ b/mkhint @@ -513,6 +513,18 @@ manifest_url_for() { pkg_has_manifest() { [[ -n "${BUNDLE_MANIFESTS[$1]:-}" ]] } + +# fetch_manifest — download the manifest to a temp file, echo its path. +# Non-zero on wget failure. Caller cleans up (path is under TMP_DIR). +fetch_manifest() { + local url="$1" + [[ -d "$TMP_DIR" ]] || mkdir -p "$TMP_DIR" + local out="${TMP_DIR}/manifest" + rm -f "$out" + wget -O "$out" "$url" >&2 || return 1 + [[ -s "$out" ]] || return 1 + printf '%s\n' "$out" +} # ── end bundled-dep manifest handling ───────────────────────────────────────── # Create new hint file -- cgit v1.2.3