From e9702c48e231a853c7e07d7d60e9f83e4b89eac1 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Tue, 21 Jan 2020 11:56:36 -0500 Subject: [PATCH] fix to use gpg2 properly --- fsf-keyring.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/fsf-keyring.sh b/fsf-keyring.sh index 1727672..64392a8 100755 --- a/fsf-keyring.sh +++ b/fsf-keyring.sh @@ -3,8 +3,9 @@ # 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() { @@ -45,8 +46,6 @@ KEYS+="0CCB3494C13CCD8F6EC73AA06DA6B7D151C7643E " #dana KEYS+="B125F60B7B287FF6A2B7DF8F170AF0E2954295DF " #ian KEYS+="ECE5B5BF952A3AEA92C137F9C9230A4849ACE0DB " #molly KEYS+="36C9950D2F68254ED89C7C03F9C13A10581AB853 " #craigt -KEYS+="E9A271C071964891AA57663D9EA33414F5852F4E " #mako -KEYS+="A2F4F1966D9E35C673EC30D5B6F1D83E9ACD9EBB " #bkuhn KEYS+="2C31130BF7D5A459AFF2A3F3C9DFFE4A33AA52D9 " #knauth KEYS+="43372794C8ADD5CA8FCFFA6CD03759DAB600E3C0 " #michael KEYS+="B102017CCF698F79423EF9CC069C04D206A59505 " #zoe @@ -60,7 +59,7 @@ for KEY in $KEYS ; do 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 @@ -74,6 +73,6 @@ echo 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~ -- 2.25.1