the generator of the dependency graph of modules can now process all modules of the current directory

bzr revid: chs@tinyerp.com-aa2f6f0e1a2080decf868cc57d8792e7612db816
This commit is contained in:
Christophe Simonis 2008-05-29 05:25:36 +00:00
parent 68ba0ff4b5
commit 5ae3f25038
1 changed files with 7 additions and 2 deletions

View File

@ -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 {'