From 55e9f58fa7c551aebfd6084b778cd942fa8b20ce Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 28 May 2026 18:46:27 +0200 Subject: Update (fixes support for a few edge cases, and leaves nothing laying around) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- util/gen-checksums | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 util/gen-checksums (limited to 'util/gen-checksums') diff --git a/util/gen-checksums b/util/gen-checksums new file mode 100755 index 0000000..bb1f981 --- /dev/null +++ b/util/gen-checksums @@ -0,0 +1,23 @@ +#!/bin/sh +# See LICENSE file for copyright and license details. + +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 +fi + +tarball="$1" +gitdir="$2" + +utildir="$(dirname -- "$0")" +(cd -- "${utildir}" && (make >/dev/null 2>/dev/null || make)) + +"${utildir}"/tmpmount /var/empty "${utildir}"/validate-tarball "${tarball}" "${gitdir}" /var/empty + +grep '^Tarball: ' | cut -d ' ' -f 2 | grep -v '^https://maandree.se/static/' | ( + "${utildir}"/get-checksums "${tarball}" + while read -r url; do + "${utildir}"/tmpmount /var/empty "${utildir}"/get-and-check "${url}" "${gitdir}" /var/empty + done +) | "${utildir}"/order-checksums -- cgit v1.3.1