aboutsummaryrefslogtreecommitdiffstats
path: root/mkhint
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-07 18:34:00 +0200
committerDanilo M. <danix@danix.xyz>2026-07-07 18:34:00 +0200
commit84904cb9dba93b7466e7847efdf6dfa48541a31a (patch)
tree774c4f2ac9ce0b161d7c8fd2f074147240704456 /mkhint
parentf0e458c39b475a887c43c7f4d3616ebb94f798ac (diff)
downloadmkhintfile-84904cb9dba93b7466e7847efdf6dfa48541a31a.tar.gz
mkhintfile-84904cb9dba93b7466e7847efdf6dfa48541a31a.zip
feat: fetch_manifest + fake-wget manifest fixture support
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'mkhint')
-rwxr-xr-xmkhint12
1 files changed, 12 insertions, 0 deletions
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 <url> — 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