<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,4 @@
 pkg/*
 coverage/*
 rdoc/*
+tools/*.png</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -62,3 +62,7 @@ if RCOV
   end
 end
 
+desc &quot;Generate Requires Graph&quot;
+task :gen_requires_graph do
+  sh %{cd tools; ./gen_requires.bash}
+end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,31 @@
 #!/bin/bash
 
-cd lib
-f=$(mktemp)
-echo &quot;strict digraph requirestree { &quot; &gt; $f
-grep -r &quot;^require &quot; * |grep -v svn |grep -v swp | sed &quot;s/^\(.*\).rb:require '\(.*\)'/\1 -&gt; \2;/&quot; | sed 's/\//_/g' &gt;&gt; $f
-echo &quot;}&quot; &gt;&gt; $f
-cd ..
-dot -Tpng $f -o gen_requires.png
-rm -f $f
+# Generate a full graph of the requires in the Ruby files of this library.
+#
+# Output : The graph is generated as a .png file in the same dir as this script.
+#
+# This script requires the following tools to be installed:
+#
+# * mktemp
+# * dot (Try 'sudo port install graphviz' on OS X)
+
+export TMPDIR='/tmp'
+export TMPFILE=$(mktemp $TMPDIR/gen_requires.XXXXXX)
+export OUTFILE='gen_requires.png'
+export SELFDIR=`pwd`
+export LIBDIR=$SELFDIR/../lib
+
+#######################################
+# Unlikely you need to edit below here
+#######################################
+
+cd $LIBDIR
+
+echo &quot;strict digraph requirestree { &quot; &gt; $TMPFILE
+grep -r &quot;^require &quot; * | grep -v swp | sed &quot;s/^\(.*\).rb:require '\(.*\)'/\1 -&gt; \2;/&quot; | sed 's/\//_/g' &gt;&gt; $TMPFILE
+echo &quot;}&quot; &gt;&gt; $TMPFILE
+
+cd $SELFDIR
+dot -Tpng $TMPFILE -o $OUTFILE
+rm -f $TMPFILE
+</diff>
      <filename>tools/gen_requires.bash</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ba590076426a37aff4a63fb61a41bd85c02d754f</id>
    </parent>
  </parents>
  <author>
    <name>Glenn Rempe</name>
    <email>glenn@rempe.us</email>
  </author>
  <url>http://github.com/ln/xmpp4r/commit/cf4f89f4a24affd768a958b0562b1fd998cc476e</url>
  <id>cf4f89f4a24affd768a958b0562b1fd998cc476e</id>
  <committed-date>2008-06-07T21:06:14-07:00</committed-date>
  <authored-date>2008-06-07T21:06:14-07:00</authored-date>
  <message>Cleaned up tools/gen_requires script, and created associated rake task.

Signed-off-by: Glenn Rempe &lt;glenn@rempe.us&gt;</message>
  <tree>100454da1ea884215a413a7b3a0d59aa0022ab66</tree>
  <committer>
    <name>Glenn Rempe</name>
    <email>glenn@rempe.us</email>
  </committer>
</commit>
