From d12f6297eddfc2b0d0d015f5dee157bbf3665465 Mon Sep 17 00:00:00 2001 From: Kristofer Hallin Date: Mon, 14 Sep 2020 10:02:20 +0200 Subject: [PATCH] Support Ubuntu 20 as well for edit-secrets. --- edit-secrets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit-secrets b/edit-secrets index a82eba5..e10ad3b 100755 --- a/edit-secrets +++ b/edit-secrets @@ -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)