#!/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-url ref-tarball < old-checksums > all-checksums\n' "$0" >&2 exit 1 fi utildir="$(dirname -- "$0")" (cd -- "${utildir}" && (make >/dev/null 2>/dev/null || make)) new_checksums="$("${utildir}"/tmpmount /var/empty "${utildir}"/check-mirror "$1" "$2" /var/empty)" (printf '%s\n' "${new_checksums}"; cat) | "${utildir}"/order-checksums