summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-08-31 16:57:19 -0400
committerLuke Smith <luke@lukesmith.xyz>2020-08-31 16:57:19 -0400
commit113499cf740a7a4473ac33414ec833d4fd9c9633 (patch)
tree3555a1b56af8c2b4b67180db70c7288b66abda89 /bin
parent8b1ba846d03009e4e771725727856f58be1c33cf (diff)
tweaks
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mw7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/mw b/bin/mw
index 57fd7b5..ca090c3 100755
--- a/bin/mw
+++ b/bin/mw
@@ -16,11 +16,12 @@ maildir="${XDG_DATA_HOME:-$HOME/.local/share}/mail" # Location of mail storage
namere="^[a-z_][a-z0-9_-]*$" # Regex to ensure viable username
emailre=".+@.+\..+" # Regex to confirm valid email address
muttshare="$prefix/share/mutt-wizard"
-mbsyncrc="${MBSYNCRC_HOME:-$HOME/.mbsyncrc}"
+mbsyncrc="${MBSYNCRC:-$HOME/.mbsyncrc}"
mwconfig="$muttshare/mutt-wizard.muttrc"
cachedir="${XDG_CACHE_HOME:-$HOME/.cache}/mutt-wizard"
muttrc="$muttdir/muttrc"
msmtprc="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/config"
+msmtplog="${XDG_CONFIG_HOME:-$HOME/.config}/msmtp/msmtp.log"
ssltype="IMAPS" # This is later changed to `None` later in the script if using Protonmail
alias mbsync='mbsync -c "$mbsyncrc"'
@@ -39,7 +40,7 @@ msmtp_header="defaults
auth on
tls on
tls_trust_file $sslcert
-logfile ${XDG_CONFIG_HOME/:-$HOME/.config}/msmtp/msmtp.log
+logfile $msmtplog
"
msmtp_profile="account $title
host $smtp
@@ -328,7 +329,7 @@ case "$1" in
add) asktype && askinfo && tryconnect && finalize || delete ;;
pass) pick "change the password of" && getpass ;;
delete) pick delete && confirm "delete the \`$title\` profile" && delete ;;
- sync) syncwrapper $2 ;;
+ sync) syncwrapper "$2" ;;
purge) purge ;;
*) cat << EOF
mw: mutt-wizard, auto-configure email accounts for mutt