summaryrefslogtreecommitdiff
path: root/bin/addons/module_graph.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@tinyerp.com>2008-05-29 05:25:36 +0000
committerChristophe Simonis <chs@tinyerp.com>2008-05-29 05:25:36 +0000
commit5ae3f250386a9eb10faeb60c61d7c9aabc64ffd3 (patch)
tree4b5aa0d72f4fd040be88d2316a4ee0bf4ed1834d /bin/addons/module_graph.py
parent68ba0ff4b588ebdfea633e0e98aa6d50e55cc7d0 (diff)
the generator of the dependency graph of modules can now process all modules of the current directory
bzr revid: chs@tinyerp.com-aa2f6f0e1a2080decf868cc57d8792e7612db816
Diffstat (limited to 'bin/addons/module_graph.py')
-rw-r--r--bin/addons/module_graph.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/addons/module_graph.py b/bin/addons/module_graph.py
index 865802526ba..01e6db67da8 100644
--- a/bin/addons/module_graph.py
+++ b/bin/addons/module_graph.py
@@ -2,11 +2,16 @@
import os
import sys
+import glob
-if not len(sys.argv)>1:
- raise Exception, 'Usage: gen_graph.sh module1 module2 module3'
+if len(sys.argv) == 2 and (sys.argv[1] in ['-h', '--help']):
+ print >>sys.stderr, 'Usage: module_graph.py [module1 module2 module3]\n\tWhen no module is specified, all modules in current directory are used'
+ sys.exit(1)
modules = sys.argv[1:]
+if not len(modules):
+ modules = map(os.path.dirname, glob.glob(os.path.join('*', '__terp__.py')))
+
done = []
print 'digraph G {'