From 09190c1735eb7482537257cab54ea4103d8ffd18 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Mon, 5 Aug 2019 21:03:47 +0200 Subject: [PATCH] Only check once for if this is a regex list or not. Signed-off-by: DL6ER --- advanced/Scripts/list.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/list.sh b/advanced/Scripts/list.sh index 31822c9a..60b820f5 100755 --- a/advanced/Scripts/list.sh +++ b/advanced/Scripts/list.sh @@ -94,15 +94,19 @@ HandleOther() { } ProcessDomainList() { + local is_regexlist if [[ "${listType}" == "regex_blacklist" ]]; then # Regex black filter list listname="regex blacklist filters" + is_regexlist=true elif [[ "${listType}" == "regex_whitelist" ]]; then # Regex white filter list listname="regex whitelist filters" + is_regexlist=true else # Whitelist / Blacklist listname="${listType}" + is_regexlist=false fi for dom in "${domList[@]}"; do @@ -115,7 +119,7 @@ ProcessDomainList() { # if delmode then remove from desired list but do not add to the other if ${addmode}; then AddDomain "${dom}" "${listType}" - if [[ ! "${listType}" == "regex_"*"list" ]]; then + if ! ${is_regexlist}; then RemoveDomain "${dom}" "${listAlt}" fi else