From 77f34fad2b12cc348bbf7e1565a73a0a072ad2c0 Mon Sep 17 00:00:00 2001 From: darosior Date: Sat, 10 Aug 2019 12:50:31 +0200 Subject: [PATCH] doc/Makefile: adapt 'check-manpages' to markdown --- doc/Makefile | 4 ++-- tools/check-manpage.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/Makefile b/doc/Makefile index 0a08c53bb..ab94d89a3 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -79,8 +79,8 @@ clean: doc-clean check: check-manpages check-manpages: cli/lightning-cli lightningd/lightningd - @tools/check-manpage.sh cli/lightning-cli doc/lightning-cli.1.txt - @tools/check-manpage.sh "lightningd/lightningd --lightning-dir=/tmp/" doc/lightningd-config.5.txt + @tools/check-manpage.sh cli/lightning-cli doc/lightning-cli.1.md + @tools/check-manpage.sh "lightningd/lightningd --lightning-dir=/tmp/" doc/lightningd-config.5.md doc-maintainer-clean: $(RM) doc/deployable-lightning.pdf diff --git a/tools/check-manpage.sh b/tools/check-manpage.sh index fe42d4724..09daf3e04 100755 --- a/tools/check-manpage.sh +++ b/tools/check-manpage.sh @@ -2,7 +2,7 @@ # Needs bash for process substitition, ie <( if [ $# != 2 ]; then - echo "Usage $0 " >&2 + echo "Usage $0 " >&2 exit 1 fi @@ -30,7 +30,7 @@ get_cmd_opts() CMD_OPTNAMES=$(get_cmd_opts "$1" | sort) # Now, gather (long) opt names from man page, make sure they match. -MAN_OPTNAMES=$(sed -E -n 's/^\*(--)?([^*/]*)\*(=?).*::/\2\3/p' < "$2" | sort) +MAN_OPTNAMES=$(sed -E -n 's/^ \*\*(--)?([^*/]*)\*\*(=?).*/\2\3/p' < "$2" | sort) if [ "$CMD_OPTNAMES" != "$MAN_OPTNAMES" ]; then echo "diff of command names vs manpage names":