diff options
Diffstat (limited to 'util/add-mirror')
| -rwxr-xr-x | util/add-mirror | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/util/add-mirror b/util/add-mirror new file mode 100755 index 0000000..70f9496 --- /dev/null +++ b/util/add-mirror @@ -0,0 +1,16 @@ +#!/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 |
