fix to use gpg2 properly
authorIan Kelling <iank@fsf.org>
Tue, 21 Jan 2020 16:56:36 +0000 (11:56 -0500)
committerIan Kelling <iank@fsf.org>
Tue, 21 Jan 2020 16:56:36 +0000 (11:56 -0500)
fsf-keyring.sh

index 1727672015fb62ec0629e9cbc0096413e399e661..64392a89a4094400c1cc7ca0ecb3ae3cc8ff2d66 100755 (executable)
@@ -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~