aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-03-24 22:39:01 +0200
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2014-03-24 22:39:01 +0200
commitf6a87ee9b7a0c00d3083ef308e478300a473bb1e (patch)
treef6a071ed790f037094a0820a5ceffee184e7b6aa
parentcf05673a9b4c872c47ebae0390fbcdbbd0e8dd84 (diff)
downloadgit-gpgcrypt-f6a87ee9b7a0c00d3083ef308e478300a473bb1e.tar.gz
Avoid file overwrite confirmation.
Change-Id: Iaf979f52a9c10451f10c8f528e33b8bd0e5ee26c
-rwxr-xr-xgit-gpgcrypt3
1 files changed, 2 insertions, 1 deletions
diff --git a/git-gpgcrypt b/git-gpgcrypt
index 730b45e..2b0c6fc 100755
--- a/git-gpgcrypt
+++ b/git-gpgcrypt
@@ -87,7 +87,8 @@ get_salt() {
}
encrypt_key() {
- echo "$1" | gpg -ea --group gr="$(sed -r -e 's/ +#[^#]*//' .recipients | tr '\n' ' ')" -r gr --output .gpgcrypt-key
+ echo "$1" | gpg -ea --group gr="$(sed -r -e 's/ +#[^#]*//' .recipients | tr '\n' ' ')" -r gr --output .gpgcrypt-key.tmp
+ mv .gpgcrypt-key.tmp .gpgcrypt-key
}
case "$1" in