# Usage: $0 [-r]
# -r means dont refresh keys from keyservers
-set -e
-set -x
+shopt -s inherit_errexit 2>/dev/null ||: # ignore fail in bash < 4.4
+set -eE -o pipefail
+trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
refresh-gpg-key() {
KEYS+="B125F60B7B287FF6A2B7DF8F170AF0E2954295DF " #ian
KEYS+="ECE5B5BF952A3AEA92C137F9C9230A4849ACE0DB " #molly
KEYS+="36C9950D2F68254ED89C7C03F9C13A10581AB853 " #craigt
-KEYS+="E9A271C071964891AA57663D9EA33414F5852F4E " #mako
-KEYS+="A2F4F1966D9E35C673EC30D5B6F1D83E9ACD9EBB " #bkuhn
KEYS+="2C31130BF7D5A459AFF2A3F3C9DFFE4A33AA52D9 " #knauth
KEYS+="43372794C8ADD5CA8FCFFA6CD03759DAB600E3C0 " #michael
KEYS+="B102017CCF698F79423EF9CC069C04D206A59505 " #zoe
if $refresh; then
refresh-gpg-key $KEY
fi
- gpg --export --armor $KEY >> /tmp/keys.asc
+ gpg2 --export --armor $KEY >> /tmp/keys.asc
done
# note: this doesn't work with gpg2. i dunno what the equivalent is in
echo "Press [enter] to continue."
echo
read
-gpg --sign ./fsf-keyring.gpg
+gpg2 --sign ./fsf-keyring.gpg
mv fsf-keyring.gpg.gpg fsf-keyring.gpg
rm fsf-keyring.gpg~