3 # gpg signs all *.tar.* files under the release directory.
4 # Invoke from that dir, or let the script try to figure it out for you.
6 # Key used is from env var EXIM_KEY; if git config finds user.signingkey, then
7 # that is the default. You can set this per-repo with:
8 # git config --local user.signingkey SOME_IDENTIFIER
10 # If not set in git config then you _MUST_ set the env var.
12 # woe betide the poor sod who does not use a gpg agent, so has
13 # to enter their password for every file...
15 if repo_signing_key
="$(git config user.signingkey)"; then
16 : "${EXIM_KEY:=$repo_signing_key}"
18 : "${EXIM_KEY:?Need a PGP key uid to sign with}"
21 : "${GPG_COMMAND:=gpg}"
24 cd_to
() { echo "Working in: $1"; cd "$1"; }
27 if [ -d ..
/..
/release-process
] && [ "${PWD##*/}" = "pkgs" ]; then
28 okay
=true
# we are in right dir
29 elif [ -d release-process
]; then
30 b
="$(find . -maxdepth 1 -name 'exim-packaging-*' | sort | tail -n 1)"
31 if [ ".$b" != "." ]; then
37 if [ -d "${1:?need a directory to look in}" ]; then
41 printf "%s: %s\n" >&2 "$(basename "$0")" "where should I be looking"
46 # Assumes no whitespace (strictly, $IFS) in filenames, which we're okay with
47 set $
(find .
-name '*.asc' -prune -o -type f
-print | cut
-c 3- |
sort)
52 ${GPG_COMMAND} --local-user "${EXIM_KEY}" --detach-sig --armor "$FILE"