aboutsummaryrefslogtreecommitdiffstats
path: root/util/order-checksums
blob: 00abca937f0e1db1411506fc1a24f60ba3dde5be (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
# See LICENSE file for copyright and license details.

set -e

if ! test $# = 0; then
	printf 'usage: %s < unordered-checksum-table > ordered-checksum-table \n' "$0" >&2
	exit 1
fi

utildir="$(dirname -- "$0")"

text="$(sort -u)"
"${utildir}"/get-checksums '-- output checksum order --' | while read sum; do
	printf '%s\n' "${text}" | grep "^${sum} checksum:"
done