icinga2/tools/markdown-link-check.sh
Markus Frosch c380efa628 Tune settings for markdown-link-check
- Don't check GitHub issue URLs
- Quiet mode for more overview
2021-04-21 17:13:06 +02:00

21 lines
343 B
Bash
Executable File

#!/bin/bash
set -e
PATH="$(pwd)/node_modules/.bin:${PATH}"
errors=0
while read -r file; do
if ! markdown-link-check --config tools/markdown-link-check.json --quiet "$file"; then
(( errors++ )) || true
fi
done < <(find -name \*.md)
if [[ $errors -gt 0 ]]; then
echo
echo "Found ${errors} files with errors!"
echo
exit 1
fi