diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-04-13 12:07:57 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-04-13 12:11:13 +0200 |
commit | a09d6685e609f9a11fa2b9b5904d39ef8966b3b7 (patch) | |
tree | 41483d166b6e193960733896e7143ae9e374772a | |
parent | caaa5f0f85fd93c1651d4c74c8bb8287a18c4e88 (diff) | |
download | pass-a09d6685e609f9a11fa2b9b5904d39ef8966b3b7.tar.gz pass-a09d6685e609f9a11fa2b9b5904d39ef8966b3b7.tar.bz2 pass-a09d6685e609f9a11fa2b9b5904d39ef8966b3b7.zip |
init: match only the public key
Diffstat (limited to '')
-rwxr-xr-x | src/password-store.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/password-store.sh b/src/password-store.sh index 6a4172d..6ea2c56 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -125,7 +125,7 @@ reencrypt_path() { done gpg_keys="$($GPG $PASSWORD_STORE_GPG_OPTS --list-keys --with-colons "${GPG_RECIPIENTS[@]}" | sed -n 's/sub:[^:]*:[^:]*:[^:]*:\([^:]*\):[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[^:]*:[a-zA-Z]*e[a-zA-Z]*:.*/\1/p' | LC_ALL=C sort -u)" fi - current_keys="$($GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | LC_ALL=C sort -u)" + current_keys="$(LC_ALL=C $GPG $PASSWORD_STORE_GPG_OPTS -v --no-secmem-warning --no-permission-warning --decrypt --list-only --keyid-format long "$passfile" 2>&1 | sed -n 's/^gpg: public key is \([A-F0-9]\+\)$/\1/p' | LC_ALL=C sort -u)" if [[ $gpg_keys != "$current_keys" ]]; then echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }" |