4
# Simple script to repopulate the 'doc' tree from
5
# the mdoc man pages stored in each project.
8
# Collect list of man pages, relative to my subdirs
10
MANPAGES=`for d in libarchive tar cpio;do ls ../../$d/*.[135];done | grep -v '\.so\.'`
13
# Build Makefile in 'man' directory
17
echo "default: all" >>Makefile
20
for f in $MANPAGES; do
21
outname="`basename $f`"
23
echo $outname: ../mdoc2man.awk $f >> Makefile
24
echo " awk -f ../mdoc2man.awk < $f > $outname" >> Makefile
30
# Rebuild Makefile in 'text' directory
34
echo "default: all" >>Makefile
37
for f in $MANPAGES; do
38
outname="`basename $f`.txt"
40
echo $outname: $f >> Makefile
41
echo " nroff -mdoc $f | col -b > $outname" >> Makefile
47
# Rebuild Makefile in 'pdf' directory
51
echo "default: all" >>Makefile
54
for f in $MANPAGES; do
55
outname="`basename $f`.pdf"
57
echo $outname: $f >> Makefile
58
echo " groff -mdoc -T ps $f | ps2pdf - - > $outname" >> Makefile
64
# Build Makefile in 'html' directory
68
echo "default: all" >>Makefile
71
for f in $MANPAGES; do
72
outname="`basename $f`.html"
74
echo $outname: $f >> Makefile
75
echo " groff -mdoc2html $f > $outname" >> Makefile
81
# Build Makefile in 'wiki' directory
85
echo "default: all" >>Makefile
88
for f in $MANPAGES; do
89
outname="`basename $f | awk '{ac=split($0,a,"[_.-]");o="ManPage";for(w=0;w<=ac;++w){o=o toupper(substr(a[w],1,1)) substr(a[w],2)};print o}'`.wiki"
91
echo $outname: ../mdoc2wiki.awk $f >> Makefile
92
echo " awk -f ../mdoc2wiki.awk < $f > $outname" >> Makefile
98
# Convert all of the manpages to -man format
100
# Format all of the manpages to text
102
# Format all of the manpages to PDF
104
# Format all of the manpages to HTML
106
# Format all of the manpages to Google Wiki syntax