diff options
author | Luke Smith <luke@lukesmith.xyz> | 2019-04-16 11:18:53 -0400 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2019-04-16 11:18:53 -0400 |
commit | a49d011bfe12a24aa2aac66027f14c77329d1efb (patch) | |
tree | 3cf938077cdcc13d9ef83419a0855490384fcf99 | |
parent | 401cbbd0024aa1a015a502c1f91e1bd34446e00c (diff) |
temporary creation of mbsync for online accounts
-rwxr-xr-x | mw | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 '<sync-mailbox><enter-command>source $accdir/$title.muttrc<enter><change-folder>!<enter>;<check-stats>'" >> "$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() { \ |