ack/bin/mk_manpage
1991-11-04 16:51:48 +00:00

19 lines
428 B
Plaintext
Executable file

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 : '.*/\([^/]*\)'`