File: gen-html

package info (click to toggle)
libdata-showtable-perl 4.6-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,020 kB
  • ctags: 37
  • sloc: perl: 2,218; sh: 38; makefile: 2
file content (37 lines) | stat: -rwxr-xr-x 959 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/sh

# set VIAMAN if you wish to generate man pages via "nroff -man"

VIAMAN=

P2M=pod2man
NROFF='nroff -man'
M2H='man2html'

P2H=pod2html

VER=`grep VERSION Makefile.PL | awk '{print $NF}' | tr -d "',"`

if [ -n "$VIAMAN" ]; then

    echo "Converting ShowTable.pm -> Data-ShowTable-$VER.html"
    $P2M ShowTable.pm | 
    $NROFF |
    $M2H -title 'Data::ShowTable(3) Man Page' > Data-ShowTable-$VER.html

    echo "Converting showtable -> showtable-$VER.html"
    $P2M showtable | 
    $NROFF |
    $M2H -title 'showtable(1) Man Page' > showtable-$VER.html

else
    echo "Converting ShowTable.pm -> Data-ShowTable-$VER.html"
    cp ShowTable.pm Data-ShowTable-$VER.pm
    $P2H --infile=Data-ShowTable-$VER.pm --outfile=Data-ShowTable-$VER.html
    rm Data-ShowTable-$VER.pm

    echo "Converting showtable -> showtable-$VER.html"
    cp showtable showtable-$VER
    $P2H --infile=showtable-$VER --outfile=showtable-$VER.html
    rm showtable-$VER
fi