refact: removes variable, use result directly in loop

Signed-off-by: wilmardo <info@wilmardenouden.nl>
This commit is contained in:
wilmardo 2019-12-05 16:20:47 +01:00
parent cf9baa76ae
commit 91d36b62f9

View file

@ -146,8 +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() {/,/}/{/{/d; /}/d; p}" functions_lib.sh | grep -vE "$checkexcluded")
for check in $included_checks; do
for check in $(sed -ne "/$i() {/,/}/{/{/d; /}/d; p}" functions_lib.sh | grep -vE "$checkexcluded"); do
"$check"
done
else