aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--util/README17
-rwxr-xr-xutil/gen-checksums13
2 files changed, 15 insertions, 15 deletions
diff --git a/util/README b/util/README
index b4ce9b4..cc72f08 100644
--- a/util/README
+++ b/util/README
@@ -62,19 +62,16 @@ get-and-check tarball-url reference-dir work-dir
checksums.
-gen-checksums tarball git-dir < version-info-file > checksum-listing
+gen-checksums tarball git-dir < tarball-url-list > checksum-listing
This brings all of the above together. The tarball,
which is assumed to be the tarball for the static release
is validates against a known good directory (git-dir),
for which the tarball is supposted to be generated from,
but this check validates that git itself is not manipulating
- the tarballs. Then it reads stdin for URLs in lines that
- begin with "Tarball: " (however, the URL for the static
- release is discarded as it is assumed to not exist yet
- but be the same file as input as the argument). These
- URLs are used to download release tarballs from all
- mirrors; they are also validates against the known good
- directory. The checksums for all tarballs, both the
- one provided in the command line and those downloaded,
- are output to stdout.
+ the tarballs. Then it reads each line from, treating each
+ line as an URL. These URLs are used to download release
+ tarballs from all mirrors; they are also validates against
+ the known good directory. The checksums for all tarballs,
+ both the one provided in the command line and those
+ downloaded, are output to stdout.
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