Correct PPTP server firewall rules chain.
[tomato/davidwu.git] / release / src / router / samba / source / script / makeyodldocs.sh
blobd0abaab7aec32310cc85f7849236099e2307f17a
1 #!/bin/sh -v
2 SRCDIR=$1
4 YODLDIR=$SRCDIR/../docs/yodldocs
5 MANPAGEDIR=$SRCDIR/../docs/manpages
6 HTMLDIR=$SRCDIR/../docs/htmldocs
8 echo "Re-creating man pages and HTML pages from YODL sources..."
10 if [ ! -d $MANPAGEDIR ]; then
11 echo "directory $MANPAGEDIR does not exist, are we in the right place?"
12 exit 1
15 if [ ! -d $HTMLDIR ]; then
16 echo "directory $HTMLDIR does not exist, are we in the right place?"
17 exit 1
20 if [ ! -d $YODLDIR ]; then
21 echo "directory $YODLDIR does not exist, are we in the right place?"
22 exit 1
25 cd $YODLDIR
27 for d in *.yo
31 # Create the basename from the YODL manpage
33 bn=`echo $d | sed -e 's/\.yo//'`
35 case "$d"
37 *.[0-9].yo)
38 echo "Creating man pages..."
39 echo $d
40 rm -f $bn.man
41 yodl2man $d
42 if [ ! -f $bn.man ]; then
43 echo "Failed to make man page for $d"
44 exit 1
46 cp $bn.man ../manpages/$bn || echo "Cannot create $YODLDIR/../manpages/$bn"
47 rm -f $bn.man
49 echo "Creating html versions of man pages..."
50 echo $d
51 rm -f $bn.html
52 yodl2html $d
53 if [ ! -f $bn.html ]; then
54 echo "Failed to make html page for $d"
55 exit 1
57 cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
58 rm -f $bn.html
62 # Non man-page YODL docs - just make html and text.
64 echo $d
65 rm -f $bn.html
66 yodl2html $d
67 if [ ! -f $bn.html ]; then
68 echo "Failed to make html page for $d"
69 exit 1
71 cp $bn.html ../htmldocs || echo "Cannot create $YODLDIR/../htmldocs/$bn.html"
72 rm -f $bn.html
73 rm -f $bn.txt
74 yodl2txt $d
75 if [ ! -f $bn.txt ]; then
76 echo "Failed to make text page for $d"
77 exit 1
79 cp $bn.txt ../textdocs || echo "Cannot create $YODLDIR/../textdocs/$bn.txt"
80 rm -f $bn.txt
82 esac
83 done
85 echo "Remember to CVS check in your changes..."
86 exit 0