diff options
author | Luke Smith <luke@lukesmith.xyz> | 2018-08-21 14:38:20 -0400 |
---|---|---|
committer | Luke Smith <luke@lukesmith.xyz> | 2018-08-21 14:38:20 -0400 |
commit | 810c7710f016f452e6aeec39be6bcde24b586c1f (patch) | |
tree | 4b448b374be9ddbc94aff27d042219d5f8789e27 /mutt-wizard.sh | |
parent | 8ba05e8ee8cea7663460deac636eadf576faa49c (diff) |
full msmtprc compatibility added
Diffstat (limited to 'mutt-wizard.sh')
-rwxr-xr-x | mutt-wizard.sh | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mutt-wizard.sh b/mutt-wizard.sh index e69effa..be166b4 100755 --- a/mutt-wizard.sh +++ b/mutt-wizard.sh @@ -1,11 +1,6 @@ #!/usr/bin/env bash -if [[ "$(uname)" == "Darwin" ]] -then - os=".macos" -else - os="" -fi +[ "$(uname)" == "Darwin" ] && os=".macos" muttdir="$HOME/.config/mutt/" @@ -199,6 +194,10 @@ addAccount() { cat "$muttdir"autoconf/offlineimap_profile"$os" | sed -e "$replacement" >> ~/.offlineimaprc mkdir -p ~/.mail/$title + # Creating msmtprc if it doesn't exist already. + if [ ! -f ~/.msmtprc ]; then cp "$muttdir"autoconf/msmtprc_header ~/.msmtprc; fi + cat "$muttdir"autoconf/msmtprc_profile | sed -e "$replacement" >> ~/.msmtprc + # Add the mutt profile. cat "$muttdir"autoconf/mutt_profile | sed -e "$replacement" > "$muttdir"accounts/$title.muttrc # Add a numbered shortcut in the muttrc |