From: Jim Meyering Date: Sat, 3 Oct 1998 19:15:41 +0000 (+0000) Subject: Invoke program with --manhelp option only if X-Git-Tag: FILEUTILS-4_0-b2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=742600e30d1db4d2d7b3be919157ac645ada3ca4;p=thirdparty%2Fcoreutils.git Invoke program with --manhelp option only if --name=STRING not specified. Otherwise, this would fail with `yes'. --- diff --git a/man/help2man b/man/help2man index cf496211a5..3915df087a 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";