diff --git a/.github/citools/awk/awk-test b/.github/citools/awk/awk-test index 1f26a816..4297c7a8 100755 --- a/.github/citools/awk/awk-test +++ b/.github/citools/awk/awk-test @@ -24,9 +24,15 @@ for d in ${AWKLIBPATH//:/ }; do printf "\n" done +declare lint_default_vars +if [[ -f .lint_default_vars ]]; then + read -r lint_default_vars <.lint_default_vars +fi + # shellcheck disable=SC2028 -echo Running: gawk --file ./*_test.awk "&&" printf "\n%s\n" "Tests Passed!" "||" printf "\n%s\n" "Tests Failed!" -if time gawk --file ./*_test.awk; then +echo Running: gawk "${lint_default_vars}" --file ./*_test.awk "&&" printf "\n%s\n" "Tests Passed!" "||" printf "\n%s\n" "Tests Failed!" +# shellcheck disable=SC2086 +if time gawk ${lint_default_vars} --file ./*_test.awk; then printf "\n%s\n" "Tests Passed!" else ((retval++)) diff --git a/awk/update_readmes b/awk/update_readmes index f7079faf..fdfad310 100755 --- a/awk/update_readmes +++ b/awk/update_readmes @@ -78,8 +78,15 @@ EOF fi +if git grep -q -- '-M'; then + printf -- "%s" " -M" >.lint_default_vars + git add .lint_default_vars +else + : >.lint_default_vars +fi + if git grep -q -- '-v '; then - git grep -- '-v ' *.bats | head -n 1 | sed -r -e 's/.*(-v [a-z]+[=].+) -f.*/\1/g' >.lint_default_vars + git grep -- '-v ' *.bats | head -n 1 | sed -r -e 's/.*(-v [a-z]+[=].+) ?.*/\1/g' | tr -d '\n' >>.lint_default_vars git add .lint_default_vars fi