summaryrefslogtreecommitdiffstats
path: root/gen-doc.bash
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2008-08-14 19:57:15 +0000
committerJason Gerard DeRose <jderose@redhat.com>2008-08-14 19:57:15 +0000
commit887667caa77bd0bd976e71e9b81b1062ae81f7bb (patch)
tree50cc88c5aeb9709f890a038853d158c270d577de /gen-doc.bash
parent43c04f1cd356a46aab6720c64e8d15900b46bfdf (diff)
downloadfreeipa-887667caa77bd0bd976e71e9b81b1062ae81f7bb.tar.gz
freeipa-887667caa77bd0bd976e71e9b81b1062ae81f7bb.tar.xz
freeipa-887667caa77bd0bd976e71e9b81b1062ae81f7bb.zip
164: Added my gen-doc.bash script
Diffstat (limited to 'gen-doc.bash')
-rwxr-xr-xgen-doc.bash34
1 files changed, 34 insertions, 0 deletions
diff --git a/gen-doc.bash b/gen-doc.bash
new file mode 100755
index 000000000..ba77547c5
--- /dev/null
+++ b/gen-doc.bash
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+# Hackish script to generate documentation using epydoc
+
+mod="ipalib"
+d="./$mod-doc"
+f="$d.tar.bz2"
+
+init="./$mod/__init__.py"
+echo "Looking for $init"
+if [[ ! -f $init ]]
+then
+ echo "Error: You do not appear to be in the project directory"
+ exit 1
+fi
+echo "You appear to be in the project directory"
+
+# Documentation
+if [[ -d $d ]]
+then
+ echo "Removing old $d directory"
+ rm -r $d
+fi
+echo "Creating documentation in $d"
+epydoc -v --output=$d --docformat=restructuredtext --html --no-frames $mod
+
+# Tarball
+if [[ -f $f ]]
+then
+ echo "Removing old $f file"
+ rm $f
+fi
+echo "Creating tarball $f"
+tar --create --bzip2 --file=$f $d