diff options
author | Phil Pennock <pdp@exim.org> | 2017-02-02 20:03:57 -0500 |
---|---|---|
committer | Phil Pennock <pdp@exim.org> | 2017-02-02 20:03:57 -0500 |
commit | 1068eac994fe4ed81deb3a992a1bdbb217043454 (patch) | |
tree | 82a65f7c21ec4cc779517eb1d44492b874206612 | |
parent | 695cfbf2894553dc8ef4eecfa64c43eb29da4814 (diff) | |
download | exim4-1068eac994fe4ed81deb3a992a1bdbb217043454.tar.gz |
RELEASE EXPERIMENT: script for the size/checksums
We include checksums in the mail; this gets the format fixed and not
including checksums-of-signatures, etc. I've also experimented with
including the size, so let's script that to be portably generated.
-rwxr-xr-x | release-process/scripts/stats_for_email | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/release-process/scripts/stats_for_email b/release-process/scripts/stats_for_email new file mode 100755 index 000000000..0eb0c2981 --- /dev/null +++ b/release-process/scripts/stats_for_email @@ -0,0 +1,28 @@ +#!/bin/sh -eu + +okay=false +if [ -d ../../release-process ] && [ "${PWD##*/}" = "pkgs" ]; then + okay=true # we are in right dir +elif [ -d release-process ]; then + b="$(find . -maxdepth 1 -name 'exim-packaging-*' | sort | tail -n 1)" + if [ ".$b" != "." ]; then + cd "$b/pkgs" + okay=true + fi +fi +if ! $okay; then + if [ -d "${1:?need a directory to look in}" ]; then + cd "$1" + shift + else + printf "%s: %s\n" >&2 "$(basename "$0")" "where should I be looking" + exit 1 + fi +fi + +set $(find "${1:-.}" -name '*.asc' -prune -o -type f -print | cut -c 3- | sort) + +# stat(1) formats are non-portable BSD vs GNU +perl -le 'print "SIZE($_)= @{[-s $_]}" foreach @ARGV' "$@" +echo +openssl dgst -sha256 "$@" |