2021-10-04 18:56:33 +00:00
#!/usr/bin/env bash
set -eo pipefail
script_path = $( cd -P -- " $( dirname -- " $0 " ) " && pwd -P)
cd " ${ script_path } /.. "
2021-10-04 19:32:31 +00:00
if [ -z " ${ MARKDOWN_CHECK_BINARY :- } " ] ; then
2021-10-04 18:56:33 +00:00
if ! [ -d Build/lagom/ ] ; then
echo "Directory Build/lagom/ does not exist. Skipping markdown check."
exit 0
fi
if ! [ -r Build/lagom/markdown-check ] ; then
echo "Lagom executable markdown-check was not built. Skipping markdown check."
echo "To enable this check, you may need to run './Meta/serenity.sh build lagom' first."
exit 0
fi
2021-10-04 19:32:31 +00:00
MARKDOWN_CHECK_BINARY = "Build/lagom/markdown-check"
2021-10-04 18:56:33 +00:00
fi
2022-02-26 15:51:24 +00:00
if [ -z " $SERENITY_SOURCE_DIR " ] ; then
SERENITY_SOURCE_DIR = $( pwd -P)
export SERENITY_SOURCE_DIR
fi
2023-05-19 23:36:52 +00:00
find AK Base Documentation Kernel Meta Ports Tests Userland -type f -name '*.md' -print0 | xargs -0 " ${ MARKDOWN_CHECK_BINARY } " README.md CONTRIBUTING.md