Added script which checks cross-document links

Added a script which reads all .md files and checks if the links are valid.
Also corrected two mistakes found by this script.
This commit is contained in:
Markus Makela
2015-12-04 12:50:53 +02:00
parent 16d53f0eb1
commit da572449c8
3 changed files with 18 additions and 2 deletions

16
Documentation/check_links.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
homedir=$(pwd)
for file in $(find . -name '*.md')
do
cd "$(dirname $file)"
for i in `grep -o '\[.*\]([^#].*[.]md)' $(basename $file)| sed -e 's/\[.*\](\(.*\))/\1/'`
do
if [ ! -f $i ]
then
echo "Link $i in $file is not correct!"
fi
done
cd "$homedir"
done