mirror of
https://github.com/GnoConsortium/gno.git
synced 2024-11-01 02:04:32 +00:00
b6e3bbc037
- initial checkin Makefile: - changes to allow for the new gsh ref manual - moved *.Z *.gz files into an "uploads" subdir README: - added some comments re the sgml stuff head.html, index.html, mkmandex, mkhtmlman, manindex.html, mkstatus, oldrefs.html, refs.html, tail.html: - eliminated <base> tags - fully specify page colours refs.html: - added links for new gsh manual index.html: - add dates for "NEW" section - added comment about new gsh manual intro.tex: - fully specify page colours - fixed a typo: "2.0.4" --> "2.0.6" in installation notes kern.tex: - fully specify page colours
90 lines
2.0 KiB
Bash
Executable File
90 lines
2.0 KiB
Bash
Executable File
#! /bin/sh
|
|
#
|
|
# Devin Reade, November 1997.
|
|
#
|
|
# $Id: mkhtmlman,v 1.9 1999/02/21 23:37:13 gdr-ftp Exp $
|
|
|
|
man2html=/usr/local/bin/man2html
|
|
TMPDIR=${TMPDIR:-/tmp}
|
|
|
|
#
|
|
# Make sure we know where everything is going.
|
|
#
|
|
if [ -z "$GNOROOT" ]; then
|
|
echo "GNOROOT variable not set"
|
|
exit 1
|
|
fi
|
|
if [ -z "$MANHTML" ]; then
|
|
echo "MANHTML variable not set"
|
|
exit 1
|
|
fi
|
|
if [ -z "$NAME" ]; then
|
|
echo "NAME variable not set"
|
|
exit 1
|
|
fi
|
|
if [ -z "$ADDR" ]; then
|
|
echo "ADDR variable not set"
|
|
exit 1
|
|
fi
|
|
if [ ! -x ./newer ]; then
|
|
echo "./newer does not exist"
|
|
exit 1
|
|
fi
|
|
set +e
|
|
|
|
listfile=$TMPDIR/mkhtmlman.1.$$
|
|
|
|
trap "rm -f $listfile" 0 1 2 15
|
|
|
|
MANDIRS="$GNOROOT/usr.man $GNOROOT/*bin* $GNOROOT/*lib*"
|
|
|
|
for section in 1 2 3 4 5 6 7 8; do
|
|
dest=$MANHTML/man$section
|
|
[ -d $dest ] || mkdir -p $dest
|
|
|
|
for F in 00.DUMMY `find $MANDIRS -type f -name '*.'$section -print \
|
|
| grep -v .AppleDouble \
|
|
| grep -v .finderinfo \
|
|
| grep -v .resource \
|
|
| grep -v libcurses/PSD.doc \
|
|
| grep -v bin/gsh/updates1.1 \
|
|
| grep -v sed/tests` ; do
|
|
[ "$F" = 00.DUMMY ] && continue;
|
|
if egrep -q -e '^'"$F"'$' ignored.pages; then
|
|
echo "$F: ignored"
|
|
continue
|
|
fi
|
|
F_noG="$F"
|
|
if [ -f $F'G' ]; then
|
|
F="$F"G
|
|
fi
|
|
macro=''
|
|
if ! egrep -q -e '^\.TH.*GNO' $F; then
|
|
if egrep -q -e '^\.Sh NAME' $F; then
|
|
echo "$F: Using the BSD-formatted man page."
|
|
macro=doc
|
|
else
|
|
echo "$F: This does not appear to be a GNO manual page." \
|
|
"Skipped."
|
|
continue
|
|
fi
|
|
fi
|
|
f=`basename $F_noG`
|
|
f2=`echo $f | perl -pe 's/\.[^\.]+$//;'`
|
|
echo "$f" >> $listfile
|
|
if ! ./newer $dest/$f.html $F; then
|
|
echo "creating $dest/$f.html"
|
|
nroff -man$macro $F | $man2html -nodepage | \
|
|
perl -p -e \
|
|
's/<BODY>/<title>GNO: '"$f2($section)"'<\/title><body bgcolor=\#ffffff textcolor=\#000000 linkcolor=\#0000FF vlinkcolor=\#001177 alinkcolor=\#001177>/;'\
|
|
> $dest/$f.html
|
|
fi
|
|
done
|
|
echo "creating $dest/00.index.html"
|
|
sort $listfile | \
|
|
./mkmandex -s$section -name="$NAME" -addr="$ADDR" -mkso="$MKSO" \
|
|
-hroot="$HTMLROOT" > $dest/00.index.html
|
|
rm $listfile
|
|
done
|
|
|