summary refs log tree commit diff stats
path: root/tools/nimweb.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-10-20 08:44:00 +0200
committerAraq <rumpf_a@web.de>2014-10-20 08:44:00 +0200
commit53a9d6f5cd199382957188cd8a1a7f0aa5035033 (patch)
tree9873032461904538e21cbff3417882d1b54ef881 /tools/nimweb.nim
parentc7570dcd3e4202bd339a2ebbc09952a546c62269 (diff)
parentb0179f9af5c5ed3cc63c5cd3b9d1055b742a3b79 (diff)
downloadNim-53a9d6f5cd199382957188cd8a1a7f0aa5035033.tar.gz
Merge branch 'devel' into bigbreak
Conflicts:
	compiler/nim.ini
	doc/manual.txt
	doc/tut2.txt
	koch.nim
	lib/system/channels.nim
	readme.txt
	tools/niminst/niminst.nim
	tools/nimweb.nim
	web/download.txt
	web/news.txt
Diffstat (limited to 'tools/nimweb.nim')
-rw-r--r--tools/nimweb.nim18
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index 24ade58fc..6312dace4 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -45,9 +45,10 @@ proc initConfigData(c: var TConfigData) =
   c.gitCommit = "master"
   c.numProcessors = countProcessors()
   # Attempts to obtain the git current commit.
-  let (output, code) = execCmdEx("git log -n 1 --format=%H")
-  if code == 0 and output.strip.len == 40:
-    c.gitCommit = output.strip
+  when false:
+    let (output, code) = execCmdEx("git log -n 1 --format=%H")
+    if code == 0 and output.strip.len == 40:
+      c.gitCommit = output.strip
   c.quotations = initTable[string, tuple[quote, author: string]]()
 
 include "website.tmpl"
@@ -285,8 +286,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"))
@@ -428,4 +431,7 @@ var c: TConfigData
 initConfigData(c)
 parseCmdLine(c)
 parseIniFile(c)
-main(c)
+when false:
+  buildPdfDoc(c, "doc")
+else:
+  main(c)