diff options
-rw-r--r-- | yarns/9000-implements.yarn | 10 | ||||
-rw-r--r-- | yarns/obnam.sh | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/yarns/9000-implements.yarn b/yarns/9000-implements.yarn index 1ae52444..1d898d7c 100644 --- a/yarns/9000-implements.yarn +++ b/yarns/9000-implements.yarn @@ -511,8 +511,16 @@ Forget a key from the user's keyring. IMPLEMENTS WHEN user (\S+) no longer has key "(.+)" export GNUPGHOME="$DATADIR/$MATCH_1.gnupg" + ls -la "$GNUPGHOME" + echo fingerprints + gpg --fingerprint "$MATCH_2" + echo with colons + gpg --fingerprint --with-colons "$MATCH_2" + echo just fingeprint + gpg --fingerprint --with-colons "$MATCH_2" | + awk -F: '{ print } /^fpr:/ { print $10; exit }' fingerprint="$(get_fingerprint "$MATCH_2")" - gpg --batch --delete-secret-key "$fingerprint" + gpg --batch --yes --delete-secret-key "$fingerprint" Lock management diff --git a/yarns/obnam.sh b/yarns/obnam.sh index b567eea4..201ffc3c 100644 --- a/yarns/obnam.sh +++ b/yarns/obnam.sh @@ -183,9 +183,8 @@ manifest() get_fingerprint() { - gpg --fingerprint "$1" | - sed -n '/^ *Key fingerprint = /s///p' | - sed 's/ *//g' + gpg --fingerprint --with-colons "$1" | + awk -F: '/^fpr:/ { print $10; exit }' } |