summaryrefslogtreecommitdiff
path: root/mutt-wizard.sh
diff options
context:
space:
mode:
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