From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> Update the check-manpages.sh script to make sure that there are no functions that are described in more than one man page. Link: https://lore.kernel.org/linux-trace-devel/20230104172655.145516-2-rostedt@xxxxxxxxxxx/ Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- check-manpages.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/check-manpages.sh b/check-manpages.sh index d3ec6af65c50..776365c53403 100755 --- a/check-manpages.sh +++ b/check-manpages.sh @@ -15,12 +15,19 @@ cd $1 MAIN=libtracefs MAIN_FILE=${MAIN}.txt +PROCESSED="" + # Ignore man pages that do not contain functions IGNORE="libtracefs-options.txt" for man in ${MAIN}-*.txt; do - sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man | while read a; do + for a in `sed -ne '/^NAME/,/^SYNOP/{/^[a-z]/{s/, *$//;s/,/\n/g;s/ //g;s/-.*$/-/;/-/{s/-//p;q};p}}' $man`; do + if [ "${PROCESSED/:${a} /}" != "${PROCESSED}" ]; then + P="${PROCESSED/:${a} */}" + echo "Found ${a} in ${man} and in ${P/* /}" + fi + PROCESSED="${man}:${a} ${PROCESSED}" if [ "${IGNORE/$man/}" != "${IGNORE}" ]; then continue fi -- 2.35.1