commit 4b3f89bc8a017a0c007a9ad6eed7d07b1b4510f1
parent 5c27254aae62aba4d3d5638422213f9b6756510c
Author: Jaromil <jaromil@dyne.org>
Date: Sat, 2 Jun 2012 14:45:15 +0200
email and login can be same in config
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/jaro b/src/jaro
@@ -346,10 +346,11 @@ read_account() {
eval "$ttmp"
# check required fields
{ test -z $host } && { error "Field missing in account $acct: host"; return 1 }
- { test -z $login } && { error "Field missing in account $acct: login"; return 1 }
+
# fill in defaults
{ test -z $name } && { name="$type" }
- { test -z $email } && { email="$login" }
+ { test -z $login } && { login="$email" } # usually email and login are the same
+ { test -z $email } && { email="$login" } # so if one is specified, deduce the other
{ test -z $transport } && { transport=ssl }
{ test -z $port } && { port=993 }
{ test -z $auth } && { auth=plain }