File: build-man.pl

package info (click to toggle)
sleuthkit 4.6.5-1%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 39,264 kB
  • sloc: ansic: 171,812; cpp: 44,216; sh: 31,364; java: 17,674; makefile: 1,241; xml: 838; perl: 797; python: 707; sed: 16
file content (19 lines) | stat: -rwxr-xr-x 533 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/perl -w

# uses pandoc (http://johnmacfarlane.net/pandoc/) to
# generate man and html pages for the tools in the
# framework.
#
# Stores the results in the man folder
use strict;

die "pandoc not found" unless (-x "/usr/local/bin/pandoc");

opendir (DIR, ".") or die "Error opening docs folder";
while (my $f = readdir(DIR)) {    
    next unless ($f =~ /^(.*?)\.1\.md$/);
    my $f1 = $1;
    system("pandoc -s -w man ${f} -o ../man/${f1}\.1");
    system("pandoc -s --toc ${f} -o ../man/${f1}\.html");
}
closedir (DIR);