summary refs log tree commit diff stats
path: root/koch.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-07-18 17:17:58 +0200
committerAndreas Rumpf <rumpf_a@web.de>2016-07-19 14:13:23 +0200
commitecae779956f5e31ec73c33f2e96da8ef61a6c05d (patch)
treeda47ea4292b12c7ecd9c59964961478ca2210cfd /koch.nim
parent358f582939ed09ccb43ce9f00d4e14741606cb36 (diff)
downloadNim-ecae779956f5e31ec73c33f2e96da8ef61a6c05d.tar.gz
koch knows about json2
Diffstat (limited to 'koch.nim')
-rw-r--r--koch.nim15
1 files changed, 8 insertions, 7 deletions
diff --git a/koch.nim b/koch.nim
index 9ccc752c0..04f6a4e4e 100644
--- a/koch.nim
+++ b/koch.nim
@@ -1,7 +1,7 @@
 #
 #
 #         Maintenance program for Nim
-#        (c) Copyright 2015 Andreas Rumpf
+#        (c) Copyright 2016 Andreas Rumpf
 #
 #    See the file "copying.txt", included in this
 #    distribution, for details about the copyright.
@@ -30,7 +30,7 @@ const
 +-----------------------------------------------------------------+
 |         Maintenance program for Nim                             |
 |             Version $1|
-|             (c) 2015 Andreas Rumpf                              |
+|             (c) 2016 Andreas Rumpf                              |
 +-----------------------------------------------------------------+
 Build time: $2, $3
 
@@ -80,17 +80,17 @@ proc findNim(): string =
   # assume there is a symlink to the exe or something:
   return nim
 
-proc exec(cmd: string, errorcode: int = QuitFailure, additionalPATH = "") =
-  let prevPATH = getEnv("PATH")
-  if additionalPATH.len > 0:
+proc exec(cmd: string, errorcode: int = QuitFailure, additionalPath = "") =
+  let prevPath = getEnv("PATH")
+  if additionalPath.len > 0:
     var absolute = additionalPATH
     if not absolute.isAbsolute:
       absolute = getCurrentDir() / absolute
     echo("Adding to $PATH: ", absolute)
-    putEnv("PATH", prevPATH & PathSep & absolute)
+    putEnv("PATH", prevPath & PathSep & absolute)
   echo(cmd)
   if execShellCmd(cmd) != 0: quit("FAILURE", errorcode)
-  putEnv("PATH", prevPATH)
+  putEnv("PATH", prevPath)
 
 proc execCleanPath(cmd: string,
                    additionalPath = ""; errorcode: int = QuitFailure) =
@@ -433,6 +433,7 @@ of cmdArgument:
   of "boot": boot(op.cmdLineRest)
   of "clean": clean(op.cmdLineRest)
   of "web": web(op.cmdLineRest)
+  of "json2": web("--json2 " & op.cmdLineRest)
   of "website": website(op.cmdLineRest & " --googleAnalytics:UA-48159761-1")
   of "web0":
     # undocumented command for Araq-the-merciful: