From 810c7710f016f452e6aeec39be6bcde24b586c1f Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Tue, 21 Aug 2018 14:38:20 -0400 Subject: full msmtprc compatibility added --- mutt-wizard.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mutt-wizard.sh') 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 -- cgit v1.2.3