Changed genman not to gzip the generated man pages.
[clive-utils.git] / genman
blobac533b07d33f093bfa3a740e0dc39185f1f7e58f
1 #!/usr/bin/env perl
3 use warnings;
4 use strict;
6 my @scripts = qw(clivefeed clivescan clivepass);
8 generate($_) foreach @scripts;
11 sub generate {
12 my ($script) = @_;
14 print "processing $script...\n";
15 open(my $fh, "<", $script) or die "error: $script: $!";
17 my $re = qr|VERSION = "(.*?)"|;
18 my $release;
20 while ( <$fh> ) {
21 if ( $_ =~ /$re/ ) {
22 $release = $1;
23 last;
27 close($fh);
29 print STDERR "error: release string not found\n" and return
30 unless $release;
32 system(qq/pod2man -c "$script Manual" -n $script /
33 . qq/-s 1 -r $release $script > $script.1/);
35 #system("gzip $script.1");