summaryrefslogtreecommitdiff
path: root/bin/mw
diff options
context:
space:
mode:
authorLuke Smith <luke@lukesmith.xyz>2020-12-24 20:40:17 -0500
committerLuke Smith <luke@lukesmith.xyz>2020-12-24 20:40:17 -0500
commit30c4647c98e2e04b86ef6189bf7974b1a3bc20bd (patch)
treed53225f72f040e5e043f98d042660384f2a57c44 /bin/mw
parent456d02d1ee0ab196ac256b91c9ac86a01f3c0bb6 (diff)
don't readd same account. fix #558
Diffstat (limited to 'bin/mw')
-rwxr-xr-xbin/mw2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/mw b/bin/mw
index d179368..61e7592 100755
--- a/bin/mw
+++ b/bin/mw
@@ -164,6 +164,8 @@ askinfo() { \
echo "\`$fulladdr\` is not a valid email address. Please retype the address:"
read -r fulladdr
done
+ grep -q "Channel\s*$fulladdr$" "$mbsyncrc" &&
+ { echo "$fulladdr has already been added" && exit 1 ;}
{ [ -z "$imap" ] || [ -z "$smtp" ] ;} && parsedomains
[ -z "$imap" ] && echo "Give your email server's IMAP address (excluding the port number):" &&
read -r imap