scripts/check_readme: Change search to be case insensitive

Signed-off-by: Iulia Moldovan <Iulia.Moldovan@analog.com>
main
Iulia Moldovan 2022-09-01 11:54:21 +03:00 committed by imoldovan
parent 8905147698
commit b1bf17d574
1 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# #
# Ensure there are Readme.md files in all the project directories # Ensure there are README.md (case insensitive name) files in all the project directories
set -e set -e
#set -x #set -x
@ -20,14 +20,13 @@ check_string(){
fi fi
} }
MISSING=$(find projects/ -mindepth 1 -maxdepth 1 \( -path projects/common -o -path projects/scripts \) -prune -o -type d '!' -exec test -e "{}/Readme.md" ';' -print) MISSING=$(find projects/ -mindepth 1 -maxdepth 1 \( -path projects/common -o -path projects/scripts \) -prune -o -type d '!' -exec test -e "{}/README.md" ';' -print)
if [ "$(echo ${MISSING} | wc -c)" -gt "1" ] ; then if [ "$(echo ${MISSING} | wc -c)" -gt "1" ] ; then
echo "Missing Readme.md files in ${MISSING}" echo "Missing README.md files in ${MISSING}"
fail=1 fail=1
fi fi
for file in $(find projects/ -mindepth 2 -maxdepth 2 -name Readme.md) for file in $(find projects/ -mindepth 2 -maxdepth 2 -iname README.md)
#for file in projects/ad5766_sdz/Readme.md
do do
check_string "Board Product Page" check_string "Board Product Page"
check_string "* Parts" check_string "* Parts"