File: gendoc.sh

package info (click to toggle)
arename 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,112 kB
  • sloc: perl: 640; sh: 585; makefile: 147
file content (22 lines) | stat: -rwxr-xr-x 500 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
#!/bin/sh

NAME="$1"

if [ ! -e "${NAME}" ] ; then
    exit 0
fi

if [ "${NAME}" -nt "${NAME}.1" ] || [ ! -e "${NAME}.1" ] ; then
    printf 'POD2MAN  %s > %s\n'  "${NAME}"   "${NAME}.1"
    pod2man  --name="${NAME}"  ./"${NAME}" > "${NAME}.1" \
        || exit 1
fi

if [ ${NAME} -nt ${NAME}.html ] || [ ! -e "${NAME}.html" ]; then
    printf 'POD2HTML %s > %s\n'  "${NAME}"   "${NAME}.html"
    pod2html                   ./"${NAME}" > "${NAME}.html" \
        || exit 1
    rm -f *.tmp
fi

exit 0