Fix substitution check (pick)

Post-build check for unexpanded substitutions adjustment to ignore
logical OR symbol (||)

Signed-off-by: Ron Stone <ronald.stone@windriver.com>
Change-Id: Iddb39dcc4f23cae76c9e1dc36b7141a58b429bd7
This commit is contained in:
Ron Stone 2022-01-20 07:16:56 -05:00
parent 0b803bfad1
commit 41eaa79c1a

View File

@ -32,10 +32,10 @@ if [ ${#INCLUDE_FILES[@]} != 0 ]; then
fi
echo "Checking for unexpanded substitution errors in output ..."
INCLUDE_FILES=( $(grep -rl --include="*.html" ' |\S*| ' .) )
INCLUDE_FILES=( $(grep -rl --include="*.html" ' |\S\+| ' .) )
if [ ${#INCLUDE_FILES[@]} != 0 ]; then
echo -e "Found ${#INCLUDE_FILES[@]} HTML file(s) that may have unexpanded substitution(s):\n${RED}"
grep -r --include="*.html" ' |\S*| ' . | awk -F: '{if(f!=$1)print ""; f=$1; print $0;}'
grep -r --include="*.html" ' |\S\+| ' . | awk -F: '{if(f!=$1)print ""; f=$1; print $0;}'
echo -e "${NC}\nCorrect the issue(s) in the corresponding rST file(s).\nHINT: Substitions are not allowed in code blocks, :ref:s,\n:doc:s, or within rST markup such as **, \`\`, and so on."
error=1
fi