summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorparazyd <parazyd@dyne.org>2016-05-07 18:28:57 (GMT)
committer parazyd <parazyd@dyne.org>2016-05-07 18:28:57 (GMT)
commit71b5e8427cbf546082694fb5b5ed7e9cae682f24 (patch)
tree9c31ea989bc84e55bc669005bc9ad683b80235fa
parent20e2f91f5f5ce52448bad934792bc6701bf58ac1 (diff)
do not re-encrypt passwordstore if already donerefs/pull/22/head
-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