summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-11-11 16:50:47 +0100
committerGitHub <noreply@github.com>2020-11-11 16:50:47 +0100
commit12dbc1ff7dd7468f0be22e597ed9e552ad545e20 (patch)
tree4edfdd9f3937c6f52cede254a5860c429c842eba /hack
parent1952420e88bad3f602ab78ea140db9872acdba2b (diff)
parentb0601cb34ada6b0d4f29bf33221d1e8584ee50ad (diff)
downloadpodman-12dbc1ff7dd7468f0be22e597ed9e552ad545e20.tar.gz
podman-12dbc1ff7dd7468f0be22e597ed9e552ad545e20.tar.bz2
podman-12dbc1ff7dd7468f0be22e597ed9e552ad545e20.zip
Merge pull request #8299 from edsantiago/ci_reenable_manpage_xref
[CI:DOCS] Restore man page cross-checker
Diffstat (limited to 'hack')
-rwxr-xr-xhack/podman-commands.sh2
-rwxr-xr-xhack/xref-helpmsgs-manpages19
2 files changed, 12 insertions, 9 deletions
diff --git a/hack/podman-commands.sh b/hack/podman-commands.sh
index 587cac782..fd4ff2501 100755
--- a/hack/podman-commands.sh
+++ b/hack/podman-commands.sh
@@ -23,7 +23,7 @@ function die() {
# the command name but not its description.
function podman_commands() {
$PODMAN help "$@" |\
- awk '/^Available Commands:/{ok=1;next}/^Flags:/{ok=0}ok { print $1 }' |\
+ awk '/^Available Commands:/{ok=1;next}/^Options:/{ok=0}ok { print $1 }' |\
grep .
}
diff --git a/hack/xref-helpmsgs-manpages b/hack/xref-helpmsgs-manpages
index a7063259f..082cc63f2 100755
--- a/hack/xref-helpmsgs-manpages
+++ b/hack/xref-helpmsgs-manpages
@@ -248,7 +248,7 @@ sub podman_help {
unless $subcommand eq 'help'; # 'help' not in man
}
}
- elsif ($section eq 'flags') {
+ elsif ($section eq 'options') {
# Handle '--foo' or '-f, --foo'
if ($line =~ /^\s{1,10}(--\S+)\s/) {
print "> podman @_ $1\n" if $debug;
@@ -293,7 +293,7 @@ sub podman_man {
elsif ($line =~ /^\#\#\s+(SUB)?COMMANDS/) {
$section = 'commands';
}
- elsif ($line =~ /^\#\#/) {
+ elsif ($line =~ /^\#\#[^#]/) {
$section = '';
}
@@ -329,12 +329,15 @@ sub podman_man {
}
@most_recent_flags = ();
- # Handle any variation of '**--foo**, **-f**'
- while ($line =~ s/^\*\*((--[a-z0-9-]+)|(-.))\*\*(,\s+)?//g) {
- $man{$1} = 1;
-
- # Keep track of them, in case we see 'Not implemented' below
- push @most_recent_flags, $1;
+ # As of PR #8292, all options are <h4> and anchored
+ if ($line =~ s/^\#{4}\s+//) {
+ # Handle any variation of '**--foo**, **-f**'
+ while ($line =~ s/^\*\*((--[a-z0-9-]+)|(-.))\*\*(,\s+)?//g) {
+ $man{$1} = 1;
+
+ # Keep track of them, in case we see 'Not implemented' below
+ push @most_recent_flags, $1;
+ }
}
}
}