diff options
author | Jeff Bigler <jcb@mit.edu> | 1996-09-06 17:16:30 +0000 |
---|---|---|
committer | Jeff Bigler <jcb@mit.edu> | 1996-09-06 17:16:30 +0000 |
commit | 0d8b52dcebd0124fe2c92a44cb0e7b632c524a1a (patch) | |
tree | 890f2800732d88ab0d870dce84c94e4d0a6f4847 /doc/man2ps | |
parent | 9afbaac6bcef083f8529f7abf9c5e54db605cea0 (diff) | |
download | krb5-0d8b52dcebd0124fe2c92a44cb0e7b632c524a1a.tar.gz krb5-0d8b52dcebd0124fe2c92a44cb0e7b632c524a1a.tar.xz krb5-0d8b52dcebd0124fe2c92a44cb0e7b632c524a1a.zip |
Completely rewrote Makefile. Fixed up man2ps script and wrote manpage
for it.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9040 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'doc/man2ps')
-rw-r--r-- | doc/man2ps | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/doc/man2ps b/doc/man2ps index 33162d4022..a42260fc1c 100644 --- a/doc/man2ps +++ b/doc/man2ps @@ -2,41 +2,43 @@ com=`basename $0` files=$* -docdir=`pwd` -mandir=$docdir/man -cd $mandir +if [ "$files" = "" ]; then + echo "Usage: $com file [file2 ...]" + exit 1 +fi for file in $files do - troff -C -man -Tps $mandir/man?/$file.? | grops -g > $file.ps + filename=`basename $file | awk -F. '{print $1}'` + troff -C -man -Tps $filename | grops -g > $filename.ps - pages=`grep '%%Pages\:' $file.ps | awk '{print $2}'` + pages=`grep '%%Pages\:' $filename.ps | awk '{print $2}'` pp=$(($pages - 1)) - echo $file': '$pages' pages' + echo $filename': '$pages' pages' if [ -e csplit ]; then - csplit -k $file.ps /Page:/ \{$pp\} + csplit -k $filename.ps /Page:/ \{$pp\} counter=0 for number in `ls xx*` do - cat xx00 > $docdir/$file$counter.ps - echo '.7 dup scale' >> $docdir/$file$counter.ps - cat $number >> $docdir/$file$counter.ps + cat xx00 > $filename$counter.ps + echo '.7 dup scale' >> $filename$counter.ps + cat $number >> $filename$counter.ps if [ $counter != $pages ]; then - echo '%%Trailer' >> $docdir/$file$counter.ps - echo 'end' >> $docdir/$file$counter.ps - echo '%%EOF' >> $docdir/$file$counter.ps + echo '%%Trailer' >> $filename$counter.ps + echo 'end' >> $filename$counter.ps + echo '%%EOF' >> $filename$counter.ps fi counter=$(($counter + 1)) done - rm $file.ps $docdir/$file'0.ps' xx* + rm $filename.ps $filename'0.ps' xx* else - echo "Can't find the csplit command. You'll have to split $file.ps manually." + echo "Can't find the csplit command. You'll have to split $filename.ps manually." fi done |