aboutsummaryrefslogtreecommitdiffstats
path: root/util/order-checksums
diff options
context:
space:
mode:
Diffstat (limited to 'util/order-checksums')
-rwxr-xr-xutil/order-checksums16
1 files changed, 16 insertions, 0 deletions
diff --git a/util/order-checksums b/util/order-checksums
new file mode 100755
index 0000000..00abca9
--- /dev/null
+++ b/util/order-checksums
@@ -0,0 +1,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