1996-05-04 11:50:46 +04:00
#!/bin/sh
1996-07-05 07:51:27 +04:00
#5 July 96 Dan.Shearer@unisa.edu.au removed hardcoded values
1996-05-04 11:50:46 +04:00
MANDIR = $1
1998-07-29 07:08:05 +04:00
SRCDIR = $2 /
1998-11-14 00:41:01 +03:00
if [ $# -ge 3 ] ; then
GROFF = $3 # sh cmd line, including options
fi
1996-05-04 11:50:46 +04:00
echo Installing man pages in $MANDIR
for d in $MANDIR $MANDIR /man1 $MANDIR /man5 $MANDIR /man7 $MANDIR /man8; do
if [ ! -d $d ] ; then
mkdir $d
if [ ! -d $d ] ; then
1996-07-05 07:51:27 +04:00
echo Failed to make directory $d , does $USER have privileges?
1996-05-04 11:50:46 +04:00
exit 1
fi
fi
done
1996-07-05 07:51:27 +04:00
for sect in 1 5 7 8 ; do
for m in $MANDIR /man$sect ; do
1998-11-11 03:40:24 +03:00
for s in $SRCDIR ../docs/manpages/*$sect ; do
1996-07-05 07:51:27 +04:00
FNAME = $m /` basename $s `
1998-11-14 00:41:01 +03:00
# Test for writability. Involves
# blowing away existing files.
if ( rm -f $FNAME && touch $FNAME ) ; then
rm $FNAME
1998-11-17 23:50:07 +03:00
if [ " x $GROFF " = x ] ; then
1998-11-14 00:41:01 +03:00
cp $s $m # Copy raw nroff
else
echo " \t $FNAME " # groff'ing can be slow, give the user
# a warm fuzzy.
$GROFF $s > $FNAME # Process nroff, because man(1) (on
# this system) doesn't .
fi
chmod 0644 $FNAME
else
echo Cannot create $FNAME ... does $USER have privileges?
fi
1996-07-05 07:51:27 +04:00
done
done
done
cat << EOF
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
The man pages have been installed. You may uninstall them using the command
the command "make uninstallman" or make "uninstall" to uninstall binaries,
man pages and shell scripts.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
EOF
1996-05-04 11:50:46 +04:00
exit 0