scripts/managen: fix option 'single'

- Fix option 'single' to generate single manpages.

As far as I can tell the option did not work prior to this change.

Example: scripts/managen -d docs/cmdline-opts single variable.md

Closes https://github.com/curl/curl/pull/16344
This commit is contained in:
Jay Satiro 2025-02-16 02:09:57 -05:00
parent 0d4a6a9500
commit 760bbb2110

View File

@ -1182,8 +1182,8 @@ HEADER
} }
sub showonly { sub showonly {
my ($f) = @_; my ($dir, $f) = @_;
if(single($f, 1)) { if(single($dir, 1, $f, 1)) {
print STDERR "$f: failed\n"; print STDERR "$f: failed\n";
} }
} }
@ -1218,7 +1218,7 @@ sub getargs {
return; return;
} }
elsif($f eq "single") { elsif($f eq "single") {
showonly($s[0]); showonly($dir, $s[0]);
return; return;
} }
elsif($f eq "protos") { elsif($f eq "protos") {