Skip to content

Commit

Permalink
awk: fix creation of .lint_default_vars
Browse files Browse the repository at this point in the history
  • Loading branch information
vpayno committed Sep 3, 2023
1 parent 339565f commit 81b44b1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions awk/update_readmes
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ EOF
fi

if git grep -q -- '-M'; then
printf -- "%s" " -M" >.lint_default_vars
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]+[=].+) ?.*/\1/g' | tr -d '\n' >>.lint_default_vars
git grep -- '-v ' *.bats | head -n 1 | sed -r -e 's/.*(-v [a-z]+[=][a-zA-Z0-9]+)\b.*$/\1/g' | tr -d '\n' >>.lint_default_vars
printf -- "%s" " " >>.lint_default_vars
git add .lint_default_vars
fi

Expand Down

0 comments on commit 81b44b1

Please sign in to comment.