1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 19:09:44 +00:00
Files
dotdrop/scripts/check-doc.sh
deadc0de6 31606969cc verbosity
2023-09-07 20:49:12 +02:00

35 lines
823 B
Bash
Executable File
Vendored

#!/bin/sh
# author: deadc0de6 (https://github.com/deadc0de6)
# Copyright (c) 2022, deadc0de6
# stop on first error
set -e
## test doc external links
echo "------------------------"
echo "checking external links"
find . -type f -iname '*.md' | while read -r line; do
./scripts/check_links.py "${line}"
done
## test the doc internal links
## https://github.com/remarkjs/remark-validate-links
## https://github.com/tcort/markdown-link-check
## npm install -g remark-cli remark-validate-links
set +e
which remark >/dev/null 2>&1
r="$?"
set -e
if [ "$r" != "0" ]; then
echo "[WARNING] install \"remark\" to test the doc"
exit 1
fi
echo "------------------------"
echo "checking internal links"
find . -type f -iname '*.md' | while read -r line; do
remark -f -u validate-links "${line}"
done
echo "documentation OK"