Files
retrobsd/src/cmd/cron/putman.sh
2015-03-21 14:11:41 -07:00

27 lines
360 B
Bash
Executable File

#!/bin/sh
# putman.sh - install a man page according to local custom
# vixie 27dec93 [original]
#
# $Id:$
PAGE=$1
DIR=$2
SECT=`expr $PAGE : '[a-z]*.\([0-9]\)'`
MDIR="$DIR/cat$SECT"
DEST="$MDIR/`basename $PAGE .$SECT`.0"
set -x
if [ ! -d $MDIR ]; then
rm -f $MDIR
mkdir -p $MDIR
chmod 755 $MDIR
fi
nroff -man $PAGE >$DEST
chmod 644 $DEST
set +x
exit 0