feat: improve sed match

Signed-off-by: wilmardo <info@wilmardenouden.nl>
This commit is contained in:
wilmardo 2019-12-05 15:51:14 +01:00
parent 1b37a1e6bc
commit cf9baa76ae

View file

@ -146,7 +146,7 @@ main () {
if command -v "$i" 2>/dev/null 1>&2; then
if [ "$checkexclude" ]; then
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
included_checks=$(sed -ne "/$i() {/,/}/{/check/p}" functions_lib.sh | grep -vE "$checkexcluded")
included_checks=$(sed -ne "/$i() {/,/}/{/{/d; /}/d; p}" functions_lib.sh | grep -vE "$checkexcluded")
for check in $included_checks; do
"$check"
done