~openstack-gd/nova/lp785816-joinedload

« back to all changes in this revision

Viewing changes to doc/generate_autodoc_index.sh

  • Committer: Todd Willey
  • Date: 2010-11-07 19:58:02 UTC
  • mto: (386.2.41 trunkdoc)
  • mto: This revision was merged to the branch mainline in revision 398.
  • Revision ID: todd@ansolabs.com-20101107195802-e33uie6t28gl5sdf
quieter doc building (less warnings).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
 
SOURCEDIR=source
 
2
 
 
3
SOURCEDIR=source/api
 
4
 
 
5
if [ ! -d ${SOURCEDIR} ] ; then
 
6
    mkdir -p ${SOURCEDIR}
 
7
fi
3
8
 
4
9
for x in `./find_autodoc_modules.sh`;
5
10
do
7
12
  echo "${SOURCEDIR}/${x}.rst" >> .autogenerated 
8
13
  ( cat <<EOF
9
14
The :mod:\`${x}\` Module
10
 
=====================
 
15
==============================================================================
11
16
.. automodule:: ${x}
12
17
  :members:
13
18
  :undoc-members:
17
22
 
18
23
done
19
24
 
 
25
if [ ! -f ${SOURCEDIR}/autoindex.rst ] ; then
 
26
 
 
27
    cat > ${SOURCEDIR}/autoindex.rst <<EOF 
 
28
.. toctree::
 
29
   :maxdepth: 1
 
30
 
 
31
EOF
 
32
    for f in `cat .autogenerated | sort` ; do
 
33
        relative=`echo ${f} | sed -e 's$^'${SOURCEDIR}'/$$'`
 
34
        echo "   ${relative}" >> ${SOURCEDIR}/autoindex.rst
 
35
    done
 
36
 
 
37
    echo ${SOURCEDIR}/autoindex.rst >> .autogenerated
 
38
fi