summaryrefslogtreecommitdiff
path: root/man/help2man
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-10-06 04:07:25 +0000
committerJim Meyering <jim@meyering.net>1998-10-06 04:07:25 +0000
commit297a13a5a3381683d0281731c6a43b44bb861623 (patch)
tree4618043c454cfd284ceed4af9f523dfaced5d55d /man/help2man
parent2aae4df6ef122ab8949438dc447e403b5d59315d (diff)
downloadcoreutils-297a13a5a3381683d0281731c6a43b44bb861623.tar.xz
import 1.5b
Diffstat (limited to 'man/help2man')
-rwxr-xr-xman/help2man21
1 files changed, 5 insertions, 16 deletions
diff --git a/man/help2man b/man/help2man
index 3915df087..c2251c34e 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.2 1998/10/03 19:15:41 meyering Exp $';
+my $RCS_Id = '$Id: help2man,v 1.3 1998/10/06 04:07:25 meyering Exp $';
my $this_program = 'help2man';
my $this_version = '0.0';
@@ -129,16 +129,12 @@ if ($include or $opt_include)
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
# Grab help and version paragraphs from executable
-# 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 @help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
+ or die "$this_program: can't get `--help' info from $ARGV[0]\n";
+
my @version = split /\n\n+/, `$ARGV[0] --version 2>/dev/null`
or die "$this_program: can't get `--version' info from $ARGV[0]\n";
-@help = split /\n\n+/, `$ARGV[0] --help 2>/dev/null`
- or die "$this_program: can't get `--help' info from $ARGV[0]\n"
- unless @help;
-
my $date = strftime "%B %Y", localtime;
(my $program = $ARGV[0]) =~ s!.*/!!;
my $package = $program;
@@ -187,14 +183,7 @@ else
$program =~ s!.*/!!;
-# Check for name in help output
-if ($help[0] =~ s/^(?:name|oneliner):\s*(\S.*)//)
-{
- ($include{NAME} = "$program \\- $1") =~ s/\s+$//;
- shift @help unless length $help[0];
-}
-
-# --name overrides --include contents and/or --manhelp oneliner
+# --name overrides --include contents
$include{NAME} = "$program \\- $opt_name" if $opt_name;
# Default (useless) NAME paragraph