forked from approvals/ApprovalTests.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fix_markdown.sh
executable file
·24 lines (20 loc) · 1005 Bytes
/
fix_markdown.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/env bash
find ./doc -name \*.md | grep -v googletest-src | xargs sed -i '' -f fix_markdown.sed
echo
echo "The following files, if any, are missing their 'top' anchor:"
find ./doc -name \*.md | grep -v .include.md | grep -v .approved.md | grep -v googletest-src | grep -v README.md | grep -v cmake-build- | grep -v '/venv/' | xargs grep -L '<a id="top"></a>' | grep -v 'relnotes_'
echo
echo "The following files in doc, if any, are missing the 'Back to User Guide' line at the end:"
find ./doc -name \*.md | grep -v .include.md | grep -v .approved.md | grep -v googletest-src | grep -v README.md | xargs grep -L 'Back to User Guide'
echo
echo "The following files, if any, are not in the User Guide (doc/README.md)"
pushd doc > /dev/null
for file in `find . -name sphinx -prune -o ! -name \*.include.md -name \*.md -print`
do
if [ $file = "./README.md" ] || [ $file = "./TemplatePage.md" ]
then
continue
fi
grep -q $file README.md || echo $file
done
popd > /dev/null