From 7627b2fb27b3a7bc530bb5700d172ee4e95b19af Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 28 May 2026 18:59:10 +0200 Subject: Fix error handling and make util/ setup and domain agnostic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- util/gen-checksums | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'util/gen-checksums') diff --git a/util/gen-checksums b/util/gen-checksums index bb1f981..2d404a0 100755 --- a/util/gen-checksums +++ b/util/gen-checksums @@ -4,7 +4,7 @@ set -e if test ! $# = 2 || test -t 0 || test -t 1; then - printf 'usage: %s tarball git-dir < version-info-file > checksum-listing\n' "$0" >&2 + printf 'usage: %s tarball git-dir < tarball-url-list > checksum-listing\n' "$0" >&2 fi tarball="$1" @@ -15,9 +15,12 @@ utildir="$(dirname -- "$0")" "${utildir}"/tmpmount /var/empty "${utildir}"/validate-tarball "${tarball}" "${gitdir}" /var/empty -grep '^Tarball: ' | cut -d ' ' -f 2 | grep -v '^https://maandree.se/static/' | ( +get_checksums () { "${utildir}"/get-checksums "${tarball}" - while read -r url; do + while read -r url; do "${utildir}"/tmpmount /var/empty "${utildir}"/get-and-check "${url}" "${gitdir}" /var/empty - done -) | "${utildir}"/order-checksums + done +} + +checksums="$(get_checksums)" +printf '%s\n' "$checksums" | "${utildir}"/order-checksums -- cgit v1.3.1