diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-20 23:28:26 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2014-04-20 23:28:26 +0200 |
commit | 6d1771c4700f6e4757524d13255cfe74aabc6610 (patch) | |
tree | 6f6678487000a5aded226733e41f593cba7da3f5 | |
parent | 834f95887f84be85b5899f00e311ba7e844bb6dc (diff) | |
download | pass-6d1771c4700f6e4757524d13255cfe74aabc6610.tar.gz pass-6d1771c4700f6e4757524d13255cfe74aabc6610.tar.bz2 pass-6d1771c4700f6e4757524d13255cfe74aabc6610.zip |
Use sort -u instead of uniq
-rwxr-xr-x | src/password-store.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/password-store.sh b/src/password-store.sh index bf76708..8b6db79 100755 --- a/src/password-store.sh +++ b/src/password-store.sh @@ -102,8 +102,8 @@ reencrypt_path() { set_gpg_recipients "$passfile_dir" [[ $prev_gpg_recipients != "${GPG_RECIPIENTS[@]}" ]] && - gpg_keys="$($GPG --list-keys --keyid-format long "${GPG_RECIPIENTS[@]}" | sed -n 's/sub *.*\/\([A-F0-9]\{16\}\) .*/\1/p' | sort | uniq)" - current_keys="$($GPG -v --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | sort | uniq)" + gpg_keys="$($GPG --list-keys --keyid-format long "${GPG_RECIPIENTS[@]}" | sed -n 's/sub *.*\/\([A-F0-9]\{16\}\) .*/\1/p' | sort -u)" + current_keys="$($GPG -v --list-only --keyid-format long "$passfile" 2>&1 | cut -d ' ' -f 5 | sort -u)" if [[ $gpg_keys != "$current_keys" ]]; then echo "$passfile_display: reencrypting to ${gpg_keys//$'\n'/ }" |