tools/check-manpage.sh: make it work on FreeBSD.

Extended regular expressions are more compatible, it seems (and simpler!).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-06-21 14:51:17 +09:30 committed by Christian Decker
parent 846d2f8726
commit f64272caea

View File

@ -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 -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":