diff options
author | Jeremy Allison <jra@samba.org> | 1998-11-11 01:16:48 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-11-11 01:16:48 +0000 |
commit | 26552543ff2960ab9c483240a27adfe15cf9c813 (patch) | |
tree | 27a76ccb582f2625659c531c7c20f308f3513153 /source3 | |
parent | 58cbefdaafcf8dc9389235928eadd17863130bd4 (diff) | |
download | samba-26552543ff2960ab9c483240a27adfe15cf9c813.tar.gz samba-26552543ff2960ab9c483240a27adfe15cf9c813.tar.bz2 samba-26552543ff2960ab9c483240a27adfe15cf9c813.zip |
Adding YODL docs maintainer script.
Jeremy.
(This used to be commit f04c2b4deeaee7360b5757de8eb7cb019d886e46)
Diffstat (limited to 'source3')
-rwxr-xr-x | source3/script/makeyodldocs.sh | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/source3/script/makeyodldocs.sh b/source3/script/makeyodldocs.sh new file mode 100755 index 0000000000..ded7d69a6d --- /dev/null +++ b/source3/script/makeyodldocs.sh @@ -0,0 +1,75 @@ +#!/bin/sh +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" + + 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" + ;; + *) +# +# Non man-page YODL docs - just make html. +# + 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" + ;; + esac +done + +echo "Remember to CVS check in your changes..." +exit 0 |