summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-10-03 19:15:41 +0000
committerJim Meyering <jim@meyering.net>1998-10-03 19:15:41 +0000
commit742600e30d1db4d2d7b3be919157ac645ada3ca4 (patch)
treec3d6846c031d0446f64f0f08d85e6f459bb6d492 /man
parent62db78c61307ea5ad1898bc34c4836a527da8e0e (diff)
downloadcoreutils-742600e30d1db4d2d7b3be919157ac645ada3ca4.tar.xz
Invoke program with --manhelp option only if
--name=STRING not specified. Otherwise, this would fail with `yes'.
Diffstat (limited to 'man')
-rwxr-xr-xman/help2man6
1 files changed, 4 insertions, 2 deletions
diff --git a/man/help2man b/man/help2man
index cf496211a..3915df087 100755
--- a/man/help2man
+++ b/man/help2man
@@ -26,7 +26,7 @@ use strict;
use Getopt::Long;
use POSIX 'strftime';
-my $RCS_Id = '$Id: help2man,v 1.1 1998/09/09 13:47:43 meyering Exp $';
+my $RCS_Id = '$Id: help2man,v 1.2 1998/10/03 19:15:41 meyering Exp $';
my $this_program = 'help2man';
my $this_version = '0.0';
@@ -129,7 +129,9 @@ if ($include or $opt_include)
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# Grab help and version paragraphs from executable
-my @help = split /\n\n+/, `$ARGV[0] --manhelp 2>/dev/null`;
+# Invoke program with `--manhelp' only if --name=STRING not specified.
+my @help = split /\n\n+/, `$ARGV[0] --manhelp 2>/dev/null`
+ if !defined $opt_name;
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
or die "$this_program: can't get `--version' info from $ARGV[0]\n";