Reported-by: Gisle Vanem
Ref: #7780
Closes #7782
my %protolong;
my %catlong;
+use POSIX qw(strftime);
+my $date = strftime "%b %e %Y", localtime;
+my $version = "unknown";
+
+open(INC, "<../../include/curl/curlver.h");
+while(<INC>) {
+ if($_ =~ /^#define LIBCURL_VERSION \"([0-9.]*)/) {
+ $version = $1;
+ last;
+ }
+}
+close(INC);
+
# get the long name version, return the man page string
sub manpageify {
my ($k)=@_;
open(F, "<:crlf", "$f");
my @d;
while(<F>) {
+ s/%DATE/$date/g;
+ s/%VERSION/$version/g;
push @d, $_;
}
close(F);
.\"
.\" DO NOT EDIT. Generated by the curl project gen.pl man page generator.
.\"
-.TH curl 1 "16 Dec 2016" "Curl 7.52.0" "Curl Manual"
+.TH curl 1 "%DATE" "curl %VERSION" "curl Manual"
.SH NAME
curl \- transfer a URL
.SH SYNOPSIS