From eac0d4cdc873962d6a3183ea8b7175549db73f72 Mon Sep 17 00:00:00 2001 From: mfornos Date: Sun, 3 May 2015 21:17:36 +0200 Subject: [PATCH] script to check README consistency --- test/check.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 test/check.sh diff --git a/test/check.sh b/test/check.sh new file mode 100755 index 0000000..8c8996e --- /dev/null +++ b/test/check.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +# +# Checks the README links. +# + +DIR=$(dirname $0) + +cat $DIR/../README.md | grep -o -E 'https?://[%\+-_./[:digit:][:alpha:]]+' | \ + xargs -n1 -P 10 curl -o /dev/null --silent --head --write-out '%{url_effective} %{http_code}\n' | \ + awk '$2 >= 400' + +exit 0 +