summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaromil <jaromil@dyne.org>2016-05-24 19:07:31 (GMT)
committer Jaromil <jaromil@dyne.org>2016-05-24 19:07:31 (GMT)
commite9b2d2e346b0edda3175db4728d7f6ee05f21da4 (patch)
tree9c31ea989bc84e55bc669005bc9ad683b80235fa
parent20e2f91f5f5ce52448bad934792bc6701bf58ac1 (diff)
parent71b5e8427cbf546082694fb5b5ed7e9cae682f24 (diff)
Merge pull request #22 from parazyd/master
do not re-encrypt passwordstore if already done
-rwxr-xr-xsrc/zlibs/filters13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/zlibs/filters b/src/zlibs/filters
index f8b375e..5b902d7 100755
--- a/src/zlibs/filters
+++ b/src/zlibs/filters
@@ -493,11 +493,14 @@ update_mutt() {
rm -f "$MAILDIRS/.mutt"/rc
gpgkey=""
- # detect the default gpg key to always encrypt also to self
- [[ -r $HOME/.gnupg/gpg.conf ]] && {
- gpgkey=`awk '/^default-key/ { print $2 }' $HOME/.gnupg/gpg.conf`
- act "default GPG key configured: $gpgkey"
- }
+ [[ -f $MAILDIRS/.pass/.gpg-id ]] || {
+ # detect the default gpg key to always encrypt also to self
+ # update: do not re-encrypt if already done
+ [[ -r $HOME/.gnupg/gpg.conf ]] && {
+ gpgkey=`awk '/^default-key/ { print $2 }' $HOME/.gnupg/gpg.conf`
+ act "default GPG key configured: $gpgkey"
+ }
+ }
cat<<EOF > "$MAILDIRS/.mutt"/rc
#### Mutt config automatically generated by Jaro Mail
### do not edit: this file is overwritten by jaro update