- print 'set vcs_name in', filename, 'to', vcs_name
- p = Pipe([['sed', '-i', "s/^vcs_name:.*/vcs_name: %s/" % vcs_name,
- filename]])
- assert p.status == 0, p.statuses
+ for directory in os.listdir(be_dir):
+ if not os.path.isdir(os.path.join(be_dir, directory)):
+ continue
+ filename = os.path.join(be_dir, directory, 'settings')
+ if os.path.exists(filename):
+ print 'set vcs_name in', filename, 'to', vcs_name
+ invoke(['sed', '-i', "s/^vcs_name:.*/vcs_name: %s/" % vcs_name,
+ filename])
+
+def make_id_cache():
+ """Generate .be/id-cache so users won't need to.
+ """
+ invoke([sys.executable, './be', 'list'])
+
+def make_html_docs(docdir):
+ """Generate docs so users won't need to install Sphinx, etc.
+ """
+ print('generate HTML docs in {}'.format(docdir))
+ status,stdout,stderr = invoke(
+ ['make', 'SPHINXBUILD=sphinx-build-2.7', 'dirhtml'], cwd=docdir)