From a08b6fffc6bde800ac51ddd954f1ec5491a6a22f Mon Sep 17 00:00:00 2001 From: practicalswift Date: Thu, 18 Jan 2018 17:35:56 +0100 Subject: [PATCH] Add consistency check for dependencies listed in README.md and doc/INSTALL.md --- Makefile | 5 ++++- tools/check-markdown.sh | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 tools/check-markdown.sh diff --git a/Makefile b/Makefile index ab632af17..b9fe9d3d7 100644 --- a/Makefile +++ b/Makefile @@ -220,7 +220,10 @@ check-whitespace/%: % check-whitespace: check-whitespace/Makefile check-whitespace/tools/check-bolt.c $(ALL_TEST_PROGRAMS:%=check-whitespace/%.c) -check-source: check-makefile check-source-bolt check-whitespace +check-markdown: + @tools/check-markdown.sh + +check-source: check-makefile check-source-bolt check-whitespace check-markdown full-check: check check-source diff --git a/tools/check-markdown.sh b/tools/check-markdown.sh new file mode 100755 index 000000000..257239bfa --- /dev/null +++ b/tools/check-markdown.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +diff -u <(egrep 'sudo apt-get install .*git' README.md) \ + <(egrep 'sudo apt-get install .*git' doc/INSTALL.md) +if [[ $? != 0 ]]; then + echo "Dependencies listed in README.md are not identical to those listed in doc/INSTALL.md (see above). Please fix." + exit 1 +fi