mu-wizard

shell script to easily configure mu4e accounts on Emacs
git clone git://git.ckyln.com/mu-wizard
Log | Files | Refs | LICENSE

commit 43d86dd3439bb93c81770c28853921e1629d0cb4
parent 11ca032c1b64dc10f7545862b7c26f86cefc83f0
Author: Cem Keylan <cem@ckyln.com>
Date:   Sun,  7 Feb 2021 10:23:00 +0300

test_connection(): send kill signal to exit on a failure

Diffstat:
Mbin/muw | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/bin/muw b/bin/muw @@ -476,10 +476,14 @@ test_connection() { # Since we are "Flattening" the inbox structure by replacing '/' with '.', # we need to also replace it in the 'mbsync -l' output by hand. See the # Flatten section on mbsync(1). - { mbsync -l "$title" || die "Log-on not successful." \ - "It seems that either you have inputted the wrong password or server settings," \ - "or there are requirements for your account out of the control of mu-wizard." - } | sed 's|/|.|g' > /tmp/mbsync-boxes + { mbsync -l "$title" || { + err "Log-on not successful." \ + "It seems that either you have inputted the wrong password or server" \ + "settings, or there are requirements for your account out of the" \ + "control of mu-wizard." + delete "$title" + kill 0 + } } | sed 's|/|.|g' > /tmp/mbsync-boxes while read -r dir; do mkdir -p "$MAILDIR/$title/${dir#/}"; done < /tmp/mbsync-boxes