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:
parent
68ba0ff4b5
commit
5ae3f25038
|
@ -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 {'
|
||||
|
|
Loading…
Reference in New Issue