diff options
Diffstat (limited to 'hack/man-page-checker')
-rwxr-xr-x | hack/man-page-checker | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/hack/man-page-checker b/hack/man-page-checker index 99d280539..17d85d65d 100755 --- a/hack/man-page-checker +++ b/hack/man-page-checker @@ -1,16 +1,6 @@ #!/bin/bash # -# man-page-name-checker - validate and cross-reference man page names -# -# FIXME as of 2019-03-20 there are still four files with inconsistent names: -# -# podman-logs.1.md NAME= podman-container-logs -# podman-info.1.md NAME= podman-system-info -# podman-rm.1.md NAME= podman-container-rm -# podman-rmi.1.md NAME= podman-image-rm -# -# If those four get renamed (with suitable symlink fixes), this script -# can be enabled in CI to prevent future inconsistencies. +# man-page-checker - validate and cross-reference man page names # die() { @@ -49,6 +39,12 @@ for md in $(ls -1 *-*.1.md | grep -v remote);do # podman.1.md has a two-column table; podman-*.1.md all have three. parent=$(echo $md | sed -e 's/^\(.*\)-.*$/\1.1.md/') + if [[ $parent =~ "podman-auto" ]]; then + # podman-auto-update.1.md is special cased as it's structure differs + # from that of other man pages where main and sub-commands split by + # dashes. + parent="podman.1.md" + fi x=3 if expr -- "$parent" : ".*-" >/dev/null; then x=4 @@ -90,6 +86,12 @@ for md in *.1.md;do # Get the command name, and confirm that it matches the md file name. cmd=$(echo "$synopsis" | sed -e 's/\(.*\)\*\*.*/\1/' | tr -d \*) md_nodash=$(basename "$md" .1.md | tr '-' ' ') + if [[ $md_nodash = 'podman auto update' ]]; then + # podman-auto-update.1.md is special cased as it's structure differs + # from that of other man pages where main and sub-commands split by + # dashes. + md_nodash='podman auto-update' + fi if [ "$cmd" != "$md_nodash" -a "$cmd" != "podman-remote" ]; then echo printf "Inconsistent program name in SYNOPSIS in %s:\n" $md |