]> granicus.if.org Git - python/commitdiff
Before running LaTeX2HTML, remove all the HTML files from the output
authorFred Drake <fdrake@acm.org>
Thu, 14 Sep 2000 22:25:47 +0000 (22:25 +0000)
committerFred Drake <fdrake@acm.org>
Thu, 14 Sep 2000 22:25:47 +0000 (22:25 +0000)
directory.  This avoids acretion of HTML from previous runs which may
have a new name; this would have avoided a lot of the packaging problems
related to changing labels from the old distutils documentation.

Doc/tools/mkhowto

index de59602d4cb1d6b86fc5ac249bb1a9302cf3ee08..7edf5ffb522105b9a11c6e5b30e933d7324c4f3d 100755 (executable)
@@ -349,6 +349,9 @@ class Job:
         # build the command line and run LaTeX2HTML:
         if not os.path.isdir(builddir):
             os.mkdir(builddir)
+        else:
+            for fname in glob.glob(os.path.join(builddir, "*.html")):
+                os.unlink(fname)
         args = [LATEX2HTML_BINARY,
                 "-init_file", self.l2h_aux_init_file,
                 "-dir", builddir,