From ee1737a52eedfa183410deadf2e02d2060015994 Mon Sep 17 00:00:00 2001 From: neil Date: Thu, 9 Jun 2016 12:45:30 +0800 Subject: [PATCH] minor, ignore empty -d value --- acme.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/acme.sh b/acme.sh index 64a762a..fffac60 100755 --- a/acme.sh +++ b/acme.sh @@ -2284,20 +2284,23 @@ _process() { --domain|-d) _dvalue="$2" - if [ -z "$_dvalue" ] || _startswith "$_dvalue" "-" ; then - _err "'$_dvalue' is not a valid domain for parameter '$1'" - return 1 - fi - - if [ -z "$_domain" ] ; then - _domain="$_dvalue" - else - if [ "$_altdomains" = "no" ] ; then - _altdomains="$_dvalue" + if [ "$_dvalue" ] ; then + if _startswith "$_dvalue" "-" ; then + _err "'$_dvalue' is not a valid domain for parameter '$1'" + return 1 + fi + + if [ -z "$_domain" ] ; then + _domain="$_dvalue" else - _altdomains="$_altdomains,$_dvalue" + if [ "$_altdomains" = "no" ] ; then + _altdomains="$_dvalue" + else + _altdomains="$_altdomains,$_dvalue" + fi fi fi + shift ;;