aboutsummaryrefslogtreecommitdiffstats
path: root/mkhint
diff options
context:
space:
mode:
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