From a49d011bfe12a24aa2aac66027f14c77329d1efb Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 16 Apr 2019 11:18:53 -0400 Subject: [PATCH] temporary creation of mbsync for online accounts --- mw | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mw b/mw index 766feb7..a661507 100755 --- a/mw +++ b/mw @@ -169,9 +169,13 @@ EOF [ ! -f "$HOME/.config/msmtp/config" ] && echo "$msmtp_header" > "$HOME/.config/msmtp/config" echo "$msmtp_profile" >> "$HOME/.config/msmtp/config" echo "$mutt_profile" > "$accdir/$title.muttrc" + echo "$mbsync_profile" >> "$mbsyncrc" echo "macro index,pager i$idnum 'source $accdir/$title.muttrc!;'" >> "$muttdir/personal.muttrc" ! grep "^source.*.muttrc" "$muttdir/personal.muttrc" >/dev/null && echo "source $accdir/$title.muttrc" >> "$muttdir/personal.muttrc" - [ "$accounttype" = "offline" ] && echo "$mbsync_profile" >> "$mbsyncrc" && trysync && finalize + if [ "$accounttype" = "offline" ]; then + trysync && finalize + sed -i "/IMAPAccount $title$/,/# End profile/d" "$mbsyncrc" + fi } getpass() { \