mirror of https://github.com/tLDP/python-tldp
docbooksgml needs to know about --script mode
This commit is contained in:
parent
ca8b8e211f
commit
62c9cef32f
|
@ -117,11 +117,14 @@ class DocbookSGML(BaseDoctype, SignatureChecker):
|
||||||
def cleaned_indexsgml(self):
|
def cleaned_indexsgml(self):
|
||||||
'''clean the junk from the output dir after building the index.sgml'''
|
'''clean the junk from the output dir after building the index.sgml'''
|
||||||
# -- be super cautious before removing a bunch of files
|
# -- be super cautious before removing a bunch of files
|
||||||
cwd = os.getcwd()
|
if not self.config.script:
|
||||||
if not os.path.samefile(cwd, self.output.dirname):
|
cwd = os.getcwd()
|
||||||
logger.error("%s (cowardly) refusing to clean directory %s", cwd)
|
if not os.path.samefile(cwd, self.output.dirname):
|
||||||
logger.error("%s expected to find %s", self.output.dirname)
|
logger.error("%s (cowardly) refusing to clean directory %s",
|
||||||
return False
|
self.source.stem, cwd)
|
||||||
|
logger.error("%s expected to find %s",
|
||||||
|
self.source.stem, self.output.dirname)
|
||||||
|
return False
|
||||||
s = '''find . -mindepth 1 -maxdepth 1 -not -type d -delete -print'''
|
s = '''find . -mindepth 1 -maxdepth 1 -not -type d -delete -print'''
|
||||||
return self.shellscript(s)
|
return self.shellscript(s)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue