summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Palmquist <stig@stig.io>2019-01-20 20:26:18 +0100
committerStig Palmquist <stig@stig.io>2019-01-20 20:26:18 +0100
commitd075438308f4e7b0640b3a907a6694b47b52aaa0 (patch)
treee09ec1325210d487d9554a6f89171abaa3031324
parent09a018ea5a081923a8d39f5f0bb02b138284230a (diff)
support multiple keys in `yadm.gpg-recipient`
-rwxr-xr-xyadm5
1 files changed, 4 insertions, 1 deletions
diff --git a/yadm b/yadm
index e55a287..5c074f1 100755
--- a/yadm
+++ b/yadm
@@ -425,7 +425,10 @@ function encrypt() {
if [ "$GPG_KEY" = "ASK" ]; then
GPG_OPTS=("--no-default-recipient" "-e")
elif [ "$GPG_KEY" != "" ]; then
- GPG_OPTS=("-e" "-r $GPG_KEY")
+ GPG_OPTS=("-e")
+ for key in $GPG_KEY; do
+ GPG_OPTS+=("-r $key")
+ done
else
GPG_OPTS=("-c")
fi