1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-28 07:21:54 +03:00
samba-mirror/source3/script/makeyodldocs.sh
Jeremy Allison f49b994aeb rpc_server/srv_netlog.c: Fixed crash bug with ACB_PWNOTREQ.
script/makeyodldocs.sh: Added code to make text docs for non-man page YODL docs.
web/cgi.c web/swat.c: SGI compiler warnings fixed.
Jeremy.
(This used to be commit 80e0f7e107)
1998-11-11 23:25:51 +00:00

95 lines
2.1 KiB
Bash
Executable File

#!/bin/sh -v
SRCDIR=$1
YODLDIR=$SRCDIR/../docs/yodldocs
MANPAGEDIR=$SRCDIR/../docs/manpages
HTMLDIR=$SRCDIR/../docs/htmldocs
echo "Re-creating man pages and HTML pages from YODL sources..."
if [ ! -d $MANPAGEDIR ]; then
echo "directory $MANPAGEDIR does not exist, are we in the right place?"
exit 1
fi
if [ ! -d $HTMLDIR ]; then
echo "directory $HTMLDIR does not exist, are we in the right place?"
exit 1
fi
if [ ! -d $YODLDIR ]; then
echo "directory $YODLDIR does not exist, are we in the right place?"
exit 1
fi
cd $YODLDIR
for d in *.yo
do
#
# Create the basename from the YODL manpage
#
bn=`echo $d | sed -e 's/\.yo//'`
case "$d"
in
*.[0-9].yo)
echo "Creating man pages..."
echo $d
rm -f $bn.man
yodl2man $d
if [ ! -f $bn.man ]; then
echo "Failed to make man page for $d"
exit 1
fi
cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn"
rm -f $bn.man
echo "Creating html versions of man pages..."
echo $d
rm -f $bn.html
yodl2html $d
if [ ! -f $bn.html ]; then
echo "Failed to make html page for $d"
exit 1
fi
cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
#
# Copy to SWAT directory.
#
if [ $bn = "smb.conf.5" ]; then
rm -f ../../swat/help/smb.conf.5.html || echo "Cannot remove ../../swat/help/smb.conf.5.html"
cp $bn.html ../../swat/help || echo "Cannot copy smb.conf.5.html to ../../swat/help/smb.conf.5.html"
fi
rm -f $bn.html
;;
*)
#
# Non man-page YODL docs - just make html and text.
#
echo $d
rm -f $bn.html
yodl2html $d
if [ ! -f $bn.html ]; then
echo "Failed to make html page for $d"
exit 1
fi
cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
rm -f $bn.html
rm -f $bn.txt
yodl2txt $d
if [ ! -f $bn.txt ]; then
echo "Failed to make text page for $d"
exit 1
fi
cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt"
rm -f $bn.txt
;;
esac
done
echo "Remember to CVS check in your changes..."
exit 0