File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ if [[ -z " $GPG_PASSPHRASE " ]]; then
4+ echo " GPG_PASSPHRASE is not set. Please set it before running this script."
5+ exit 1
6+ fi
7+
38gpg --batch --gen-key << EOF
49Key-Type: 1
510Key-Length: 2048
@@ -8,7 +13,12 @@ Subkey-Length: 2048
813Name-Real: zephyrscale
914Name-Email: tm4j.bot@gmail.com
1015Expire-Date: 0
11- Passphrase: ${ GPG_PASSPHRASE}
16+ Passphrase: $GPG_PASSPHRASE
1217EOF
1318
14- gpg --keyserver hkps://keys.openpgp.org --send-keys $( gpg --with-colons --fingerprint | awk -F: ' $1 == "fpr" {print $10;}' )
19+ FINGERPRINT=$( gpg --with-colons --fingerprint | awk -F: ' $1 == "fpr" {print $10;}' )
20+ if [[ -z " $FINGERPRINT " ]]; then
21+ echo " No GPG key fingerprint found. Please check if the key was generated successfully."
22+ exit 1
23+ fi
24+ gpg --keyserver hkps://keys.openpgp.org --send-keys $FINGERPRINT
You can’t perform that action at this time.
0 commit comments