diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-09-13 09:43:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-09-13 09:43:21 -0700 |
commit | 5280f9a0cd1f9ba200422ebba65d1e0133410995 (patch) | |
tree | bf85ce4e320a769d7e0903ff52ccfde13a422666 /src/man2dvi | |
download | man-5280f9a0cd1f9ba200422ebba65d1e0133410995.tar.gz man-5280f9a0cd1f9ba200422ebba65d1e0133410995.tar.bz2 man-5280f9a0cd1f9ba200422ebba65d1e0133410995.zip |
Initial.man-1.6g
Diffstat (limited to 'src/man2dvi')
-rwxr-xr-x | src/man2dvi | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/man2dvi b/src/man2dvi new file mode 100755 index 0000000..f9cb52e --- /dev/null +++ b/src/man2dvi @@ -0,0 +1,36 @@ +#! /bin/sh +# +# Script to format manpages to dvi. +# Copyright (c) 1997 Tobias Begalke (tb@lst.de) +# +# Part of release 1.6g of the man suite. +# + +groff="groff -Tdvi -mandoc" + +if [ ! $# = 1 ]; then + echo "$0: usage:" + echo " $0 [topic] > topic.dvi" + exit 1 +fi + +location=`man -c -w $1` + +if [ "$location" = "" ]; then + exit 1 +fi + +case `file $location` in + *gzip* ) + zcat $location | $groff + ;; + + *bzip2* ) + bzcat $location | $groff + ;; + + *troff* ) + $groff $location + ;; +esac + |