diff options
author | Araq <rumpf_a@web.de> | 2014-10-19 20:05:01 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-10-19 20:05:01 +0200 |
commit | 2e4447ca852b4f462814e95c72c2b0dd7893bd6f (patch) | |
tree | b7d1cc0c175eb6698d0dcc1e7463da4d2110aa95 /tools | |
parent | 4cca562c4a5386656c85008ba17865b67b479fc5 (diff) | |
download | Nim-2e4447ca852b4f462814e95c72c2b0dd7893bd6f.tar.gz |
documentation improvements
Diffstat (limited to 'tools')
-rw-r--r-- | tools/nimweb.nim | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim index d76c5e354..00faecc01 100644 --- a/tools/nimweb.nim +++ b/tools/nimweb.nim @@ -239,7 +239,7 @@ proc mexec(cmds: openarray[string], processors: int) = sexec(cmds) return - if 0 != execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd}): + if execProcesses(cmds, {poStdErrToStdOut, poParentStreams, poEchoCmd}) != 0: echo "external program failed, retrying serial work queue for logs!" sexec(cmds) @@ -289,8 +289,10 @@ proc buildPdfDoc(c: var TConfigData, destPath: string) = exec("pdflatex " & changeFileExt(d, "tex")) exec("pdflatex " & changeFileExt(d, "tex")) # delete all the crappy temporary files: - var pdf = splitFile(d).name & ".pdf" - moveFile(dest=destPath / pdf, source=pdf) + let pdf = splitFile(d).name & ".pdf" + let dest = destPath / pdf + removeFile(dest) + moveFile(dest=dest, source=pdf) removeFile(changeFileExt(pdf, "aux")) if existsFile(changeFileExt(pdf, "toc")): removeFile(changeFileExt(pdf, "toc")) @@ -432,4 +434,7 @@ var c: TConfigData initConfigData(c) parseCmdLine(c) parseIniFile(c) -main(c) +when false: + buildPdfDoc(c, "doc") +else: + main(c) |