summaryrefslogtreecommitdiff
path: root/Meta/check-markdown.sh
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-02-26 16:51:24 +0100
committerIdan Horowitz <idan.horowitz@gmail.com>2022-02-26 20:05:06 +0200
commit084347becc9292bae3a38c21b897487a1cc48d57 (patch)
tree5041be921e9a211dee7b54b47b5ede021d03c8a4 /Meta/check-markdown.sh
parent4ef1bedc380d44eefee8c94ff7f83382f2e63d57 (diff)
downloadserenity-084347becc9292bae3a38c21b897487a1cc48d57.zip
Utilities+Meta: Check icons in markdown-check
We use the environment variable SERENITY_SOURCE_DIR to resolve and check icon links. This is a bit inconvenient as SERENITY_SOURCE_DIR needs to be set correctly before invoking the markdown checker, but as we use it through the check-markdown script anyways, I think it's not a problem.
Diffstat (limited to 'Meta/check-markdown.sh')
-rwxr-xr-xMeta/check-markdown.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/Meta/check-markdown.sh b/Meta/check-markdown.sh
index 0eeba1b745..cbbafbb1da 100755
--- a/Meta/check-markdown.sh
+++ b/Meta/check-markdown.sh
@@ -18,4 +18,9 @@ if [ -z "${MARKDOWN_CHECK_BINARY:-}" ] ; then
MARKDOWN_CHECK_BINARY="Build/lagom/markdown-check"
fi
+if [ -z "$SERENITY_SOURCE_DIR" ] ; then
+ SERENITY_SOURCE_DIR=$(pwd -P)
+ export SERENITY_SOURCE_DIR
+fi
+
find AK Base Documentation Kernel Meta Ports Tests Userland -path 'Ports/*/*' -prune -o -type f -name '*.md' -print0 | xargs -0 "${MARKDOWN_CHECK_BINARY}" README.md