Added mk_manpage

This commit is contained in:
ceriel 1991-11-04 16:51:48 +00:00
parent 4affc39a20
commit b3f07ce236
2 changed files with 19 additions and 1 deletions

View file

@ -3,6 +3,6 @@ cc-and-mkdep.all
cc-and-mkdep.sun
do_deps
do_resolve
em.pascal
lint-lib.ack
lint-lib.unix
mk_manpage

18
bin/mk_manpage Executable file
View file

@ -0,0 +1,18 @@
num=`expr $1 : '.*\.\([1-8]\)'`
if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi
if [ -f $2/man/head ] ; then : ; else cat > $2/man/head <<'EOF'
.rn TH yy
.de TH
.di zz
.yy "\\$1" "\\$2" "\\$3" "\\$4"
.ds ]W 5th ACK distribution
.ds ]D Amsterdam Compiler Kit
.ds ]L "\\$3
.di
.rm zz
..
EOF
fi
if [ -d $2/man/man$num ] ; then : ; else mkdir $2/man/man$num ; fi
cat $2/man/head $1 > $2/man/man$num/`expr //$1 : '.*/\([^/]*\)'`