mirror of
https://github.com/docker/docker-bench-security.git
synced 2025-01-18 16:22:33 +01:00
refact: removes variable, use result directly in loop
Signed-off-by: wilmardo <info@wilmardenouden.nl>
This commit is contained in:
parent
cf9baa76ae
commit
91d36b62f9
1 changed files with 1 additions and 2 deletions
|
@ -146,8 +146,7 @@ main () {
|
||||||
if command -v "$i" 2>/dev/null 1>&2; then
|
if command -v "$i" 2>/dev/null 1>&2; then
|
||||||
if [ "$checkexclude" ]; then
|
if [ "$checkexclude" ]; then
|
||||||
checkexcluded="$(echo ",$checkexclude" | sed -e 's/^/\^/g' -e 's/,/\$|/g' -e 's/$/\$/g')"
|
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 $(sed -ne "/$i() {/,/}/{/{/d; /}/d; p}" functions_lib.sh | grep -vE "$checkexcluded"); do
|
||||||
for check in $included_checks; do
|
|
||||||
"$check"
|
"$check"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue