diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-07 18:34:00 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-07 18:34:00 +0200 |
| commit | 84904cb9dba93b7466e7847efdf6dfa48541a31a (patch) | |
| tree | 774c4f2ac9ce0b161d7c8fd2f074147240704456 /mkhint | |
| parent | f0e458c39b475a887c43c7f4d3616ebb94f798ac (diff) | |
| download | mkhintfile-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-x | mkhint | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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 |
