some tools for internal use
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
560 B

#!/usr/bin/env sh
test $# -lt 2 && printf "arguments missing: keyid chiffre\n"
gpg2 --list-key "${k}" || { echo "error: key not found."; exit 1; }
c=$(gpg2 --with-colons --list-key "${k}"|grep -i "^pub"|wc -l)
test $c -ne 1 && { echo "error: id matches more than a single key. invalid id."; exit 2; }
# i=$(cat members.csv|grep -i $(gpg2 --fingerprint "${k}"))
#overwrite existing files
#export minimized
gpg2 --batch --yes --armor --output ${p}${f} --export-options export-minimal --export "${k}"
exit 0