diff options
Diffstat (limited to 'util/gen-checksums')
| -rwxr-xr-x | util/gen-checksums | 23 |
1 files changed, 23 insertions, 0 deletions
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 |
