update-keys: use gpg.conf to persist versions

It is easier than passing around a dozen options on the command line.

Signed-off-by: Christian Hesse <mail@eworm.de>
This commit is contained in:
Eli Schwartz 2019-08-05 17:16:04 -04:00 committed by Christian Hesse
parent 0d99720ded
commit 44f69d009f

View File

@ -8,7 +8,16 @@ TMPDIR=$(mktemp -d)
trap "rm -rf '${TMPDIR}'" EXIT
KEYSERVER='hkp://pool.sks-keyservers.net'
GPG=(gpg --quiet --batch --no-tty --no-permission-warning --export-options no-export-attributes --keyserver "${KEYSERVER}" --homedir "${TMPDIR}")
GPG=(gpg --homedir "${TMPDIR}")
cat << __EOF__ > "${TMPDIR}"/gpg.conf
quiet
batch
no-tty
no-permission-warning
export-options no-export-attributes
keyserver ${KEYSERVER}
__EOF__
pushd "$(dirname "$0")" >/dev/null