From da572449c8da2d6de88bcd66886b1e3491be2511 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 4 Dec 2015 12:50:53 +0200 Subject: [PATCH] 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. --- Documentation/About/About-MaxScale.md | 2 +- .../MariaDB-MaxScale-Installation-Guide.md | 2 +- Documentation/check_links.sh | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100755 Documentation/check_links.sh diff --git a/Documentation/About/About-MaxScale.md b/Documentation/About/About-MaxScale.md index ef0723914..1db391d22 100644 --- a/Documentation/About/About-MaxScale.md +++ b/Documentation/About/About-MaxScale.md @@ -19,5 +19,5 @@ Bugs can be reported in the MariaDB Jira ## Installing MaxScale Information about installing MaxScale, either from a repository or by building from source code, is included in the [MariaDB MaxScale Installation Guide](../Getting-Started/MariaDB-MaxScale-Installation-Guide.md). -The same guide also provides basic information on running MaxScale. More detailed information about configuring MaxScale is given in the [Configuration Guide](/Documentation/Getting-Started/Configuration-Guide.md). +The same guide also provides basic information on running MaxScale. More detailed information about configuring MaxScale is given in the [Configuration Guide](../Getting-Started/Configuration-Guide.md). diff --git a/Documentation/Getting-Started/MariaDB-MaxScale-Installation-Guide.md b/Documentation/Getting-Started/MariaDB-MaxScale-Installation-Guide.md index bf752b1fd..bcb2ff48b 100644 --- a/Documentation/Getting-Started/MariaDB-MaxScale-Installation-Guide.md +++ b/Documentation/Getting-Started/MariaDB-MaxScale-Installation-Guide.md @@ -36,7 +36,7 @@ An example configuration file is installed into the `/etc/` folder. This file sh ## Building MaxScale From Source Code -Alternatively you may download the MaxScale source and build your own binaries. To do this, refer to the separate document [Building MaxScale from Source Code](/Documentation/Getting-Started/Building-MaxScale-from-Source-Code.md) +Alternatively you may download the MaxScale source and build your own binaries. To do this, refer to the separate document [Building MaxScale from Source Code](Building-MaxScale-from-Source-Code.md) ## Configuring MaxScale diff --git a/Documentation/check_links.sh b/Documentation/check_links.sh new file mode 100755 index 000000000..3a5259f2c --- /dev/null +++ b/Documentation/check_links.sh @@ -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