summaryrefslogtreecommitdiff
path: root/mutt-wizard.sh
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2018-08-21 14:38:20 -0400
committerLuke Smith <luke@lukesmith.xyz>2018-08-21 14:38:20 -0400
commit810c7710f016f452e6aeec39be6bcde24b586c1f (patch)
tree4b448b374be9ddbc94aff27d042219d5f8789e27 /mutt-wizard.sh
parent8ba05e8ee8cea7663460deac636eadf576faa49c (diff)
full msmtprc compatibility added
Diffstat (limited to 'mutt-wizard.sh')
-rwxr-xr-xmutt-wizard.sh11
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