diff options
author | Tommi Virtanen <tommi.virtanen@dreamhost.com> | 2011-12-06 12:04:03 -0800 |
---|---|---|
committer | Tommi Virtanen <tommi.virtanen@dreamhost.com> | 2011-12-06 12:07:59 -0800 |
commit | 200d7c89a6130847771dc4ab83cfbe1ea159c58e (patch) | |
tree | 55646f5ba258862a61cd4c952c768cafc6294125 /admin | |
parent | 33753c82af257c14baae1a7bf00e6dc492a93fef (diff) | |
download | ceph-200d7c89a6130847771dc4ab83cfbe1ea159c58e.tar.gz |
doc: Switch diagram tools from dia to ditaa.
Now you can create diagrams easily with the ".. ditaa::"
directive in the Sphinx documents.
admin/build-doc now checks for debs required for building
the documentation, or just lists commands missing for hosts
not using dpkg.
For more on Ditaa, see http://ditaa.sourceforge.net/
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
Diffstat (limited to 'admin')
-rwxr-xr-x | admin/build-doc | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/admin/build-doc b/admin/build-doc index 52c3870a9f4..aff578e131a 100755 --- a/admin/build-doc +++ b/admin/build-doc @@ -5,14 +5,36 @@ cd .. install -d -m0755 build-doc +if command -v dpkg >/dev/null; then + for package in python-dev python-pip python-virtualenv doxygen ditaa; do + if [ "$(dpkg --status -- $package|sed -n 's/^Status: //p')" != "install ok installed" ]; then + # add a space after old values + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required packages, please install them:" 1>&2 + echo "sudo apt-get install $missing" + exit 1 + fi +else + for command in virtualenv doxygen ditaa; do + if ! command -v "$command" >/dev/null; then + # add a space after old values + missing="${missing:+$missing }$package" + fi + done + if [ -n "$missing" ]; then + echo "$0: missing required command, please install them:" 1>&2 + echo "$missing" + exit 1 + fi +fi + if [ ! -e build-doc/doxygen/xml ]; then doxygen fi -dia --filter=png-libart --export=doc/overview.png.tmp doc/overview.dia - -mv -- doc/overview.png.tmp doc/overview.png - cat src/osd/PG.h src/osd/PG.cc | doc/scripts/gen_state_diagram.py > doc/dev/peering_graph.generated.dot cd build-doc @@ -35,6 +57,8 @@ if [ -z "$(git rev-parse --default HEAD)" ]; then fi cd .. +./virtualenv/bin/pip install --quiet -e 'git+https://github.com/NewDreamNetwork/sphinx-ditaa.git#egg=sphinx-ditaa' + install -d -m0755 \ output/html \ output/man |