+ revcert=$(GNUPGHOME="$GNUPGHOME_HOST" gpg --no-greeting --quiet --armor --gen-revoke "0x${keyID}!") \
+ || failure "Failed to generate revocation certificate!"
+ fi
+
+ # if you run gpg --gen-revoke but cancel it or quit in the middle,
+ # it returns success, but emits no revocation certificate:
+ if ! [ "$revcert" ] ; then
+ failure "Revocation canceled."
+ fi
+
+ ## ok, now we have the revocation certificate. Print it, and
+ ## offer to publish if originally requested:
+ printf "%s\n" "$revcert"