summaryrefslogtreecommitdiffstats
path: root/update-dbus-docs.sh
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2005-01-21 04:47:31 +0000
committerHavoc Pennington <hp@redhat.com>2005-01-21 04:47:31 +0000
commita26b75f29e344791be43c1a3451b79d8c0f96808 (patch)
tree450ae629856523f4432449787b5a6acb292c420f /update-dbus-docs.sh
parenta0effa85934657d79c24d4f3fff688f9bd6f154e (diff)
2005-01-20 Havoc Pennington <hp@redhat.com>
* update-dbus-docs.sh: script to update docs on the web site, only works for me though. neener.
Diffstat (limited to 'update-dbus-docs.sh')
-rwxr-xr-xupdate-dbus-docs.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/update-dbus-docs.sh b/update-dbus-docs.sh
new file mode 100755
index 00000000..0abc54f3
--- /dev/null
+++ b/update-dbus-docs.sh
@@ -0,0 +1,47 @@
+#! /bin/bash
+
+function die()
+{
+ echo $* 2>&1
+ exit 1
+}
+
+CHECKOUTDIR=/tmp/dbus-for-docs
+export CVSROOT=:ext:hp@cvs.freedesktop.org:/cvs/dbus
+
+cd $CHECKOUTDIR || die "could not changedir to $CHECKOUTDIR"
+
+echo "Checking out to directory "`pwd`
+
+#cvs co dbus || die "failed to cvs update"
+
+cd dbus
+
+echo "Configuring and building docs"
+
+./autogen.sh || die "could not autogen"
+doxygen Doxyfile || die "could not run Doxygen"
+cd doc || die "could not cd to doc dir"
+make || die "could not build docs"
+cd .. || die "could not cd up"
+
+MANFILES=`find -name "dbus*.1"`
+for M in $MANFILES ; do
+ BASENAME=`basename $M`
+ echo "Converting $M to $BASENAME.html"
+ man2html $M > doc/$BASENAME.html
+done
+
+echo "Packing docs into tarball"
+cp README HACKING AUTHORS NEWS ChangeLog doc/ || die "could not copy in assorted files"
+tar cfz dbus-docs.tar.gz doc/*.dtd doc/*.xml doc/*.html doc/*.txt doc/api/html/*.html doc/api/html/*.css doc/api/html/*.png doc/HACKING doc/AUTHORS doc/NEWS doc/ChangeLog doc/TODO doc/README doc/*.png doc/*.svg || die "could not tar up docs"
+
+tar tfz dbus-docs.tar.gz | sort > tarball.list || die "could not list tarball contents"
+find doc -not -type d | grep -v CVS | grep -v -E '.~[0-9.]+~' | grep -v Makefile | grep -vE '.c$' | grep -v man3dbus | grep -v .cvsignore | sort > filesystem.list || die "could not list doc/* contents"
+
+diff -u filesystem.list tarball.list || die "some files were not included"
+
+echo "Uploading docs to server"
+scp dbus-docs.tar.gz pdx.freedesktop.org:
+ssh hp@pdx.freedesktop.org '(cd /srv/dbus.freedesktop.org/www/ && /bin/cp -f ~/dbus-docs.tar.gz . && tar zxf dbus-docs.tar.gz && echo "Successfully unpacked tarball on server")'
+