Support Ubuntu 20 as well for edit-secrets.

This commit is contained in:
Kristofer Hallin 2020-09-14 10:02:20 +02:00 committed by Patrik Lundin
parent c8451c2122
commit d12f6297ed
Signed by: patlu
GPG key ID: A0A812BA2249F294

View file

@ -172,7 +172,7 @@ function edit_gpg_file()
echo "$0: No changes detected"
else
# figure out this hosts gpg key id
if lsb_release -r | grep -q 18.04; then
if lsb_release -r | grep -qE '(18|20).04'; then
recipient=$($GPG --list-secret-keys | grep -A1 '^sec' | tail -1 | awk '{print $1}')
else
recipient=$($GPG --list-secret-key | grep ^sec | head -1 | awk '{print $2}' | cut -d / -f 2)