From: Pieter Lexis Date: Fri, 6 Mar 2015 08:43:01 +0000 (+0100) Subject: Make linkchecker quiet unless errors are found X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~98^2~65^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2322%2Fhead;p=thirdparty%2Fpdns.git Make linkchecker quiet unless errors are found --- diff --git a/docs/Makefile.am b/docs/Makefile.am index c8cff79f8e..34f81e31f5 100644 --- a/docs/Makefile.am +++ b/docs/Makefile.am @@ -48,13 +48,8 @@ endif if HAVE_LINKCHECKER check-links: html - linkchecker --anchors \ - --ignore-url=.eot$ \ - --ignore-url=\.svg \ - --ignore-url=mailto \ - --ignore-url=.ttf$ \ - --ignore-url=woff$ \ - html/index.html + ./checklinks.sh + endif clean: diff --git a/docs/checklinks.sh b/docs/checklinks.sh new file mode 100755 index 0000000000..60296b39e1 --- /dev/null +++ b/docs/checklinks.sh @@ -0,0 +1,19 @@ +#!/bin/sh +OUTPUT=$(linkchecker \ + --anchors \ + --ignore-url=.eot$ \ + --ignore-url=\.svg \ + --ignore-url=mailto \ + --ignore-url=.ttf$ \ + --ignore-url=woff$ \ + html/index.html 2>&1) + +if [ $? -ne 0 ]; then + echo "Errors in links detected, log follows:" + echo "$OUTPUT" + exit 1 +else + echo "Links OK!" + exit 0 +fi +