summaryrefslogtreecommitdiff
path: root/extras/rule_generator
diff options
context:
space:
mode:
Diffstat (limited to 'extras/rule_generator')
-rw-r--r--extras/rule_generator/rule_generator.functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/extras/rule_generator/rule_generator.functions b/extras/rule_generator/rule_generator.functions
index 495bb7b047..aaf66a6fa0 100644
--- a/extras/rule_generator/rule_generator.functions
+++ b/extras/rule_generator/rule_generator.functions
@@ -92,6 +92,10 @@ find_all_rules() {
local linkre="$2"
local match="$3"
- local search='.*[[:space:],]'"$key"'"\('"$linkre"'\)"[[:space:]]*\(,.*\|\\\|\)$'
- echo $(sed -n -e "${match}s/${search}/\1/p" $RO_RULES_FILE $RULES_FILE 2>/dev/null)
+ local search='[[:space:],]'"$key"'"('"$linkre"')"[[:space:]]*(,.*|\\|)$'
+
+ echo $(sed -n -r -e 's/^#.*//' -e "${match}s/${search}/\1/p" \
+ $RO_RULES_FILE \
+ $([ -e $RULES_FILE ] && echo $RULES_FILE) \
+ 2>/dev/null)
}