Build: check during make for perl script library requirements
[exim.git] / release-process / scripts / stats_for_email
1 #!/bin/sh -eu
2
3 okay=false
4 # if [ -d ../../release-process ] && [ "${PWD##*/}" = "pkgs" ]; then
5 #       okay=true # we are in right dir
6 # elif [ -d release-process ]; then
7 #       b="$(find . -maxdepth 1 -name 'exim-packaging-*' | sort | tail -n 1)"
8 #       if [ ".$b" != "." ]; then
9 #               cd "$b/pkgs"
10 #               okay=true
11 #       fi
12 # fi
13 # if ! $okay; then
14         if [ -d "${1:?need a directory to look in}" ]; then
15                 cd "$1"
16                 shift
17         else
18                 printf "%s: %s\n" >&2 "$(basename "$0")" "where should I be looking"
19                 exit 1
20         fi
21 # fi
22
23 set $(find "${1:-.}" -name '*.asc' -prune -o -type f -print | cut -c 3- | sort)
24
25 # stat(1) formats are non-portable BSD vs GNU
26 perl -le 'print "SIZE($_)= @{[-s $_]}" foreach @ARGV' "$@"
27 echo
28 openssl dgst -sha256 "$@"