summary refs log tree commit diff stats
path: root/install_tools.nims
diff options
context:
space:
mode:
Diffstat (limited to 'install_tools.nims')
-rw-r--r--install_tools.nims21
1 files changed, 13 insertions, 8 deletions
diff --git a/install_tools.nims b/install_tools.nims
index 6ecc545a5..f5f320f78 100644
--- a/install_tools.nims
+++ b/install_tools.nims
@@ -3,13 +3,18 @@ import ospaths
 
 mode = ScriptMode.Verbose
 
-let nimbleExe = "./bin/nimble".toExe
-selfExec "c --noNimblePath -p:compiler -o:" & nimbleExe &
-    " dist/nimble/src/nimble.nim"
+echo "This script is deprecated. Use 'koch tools' instead."
 
-let nimsugExe = "./bin/nimsuggest".toExe
-selfExec "c --noNimblePath -p:compiler -o:" & nimsugExe &
-    " dist/nimsuggest/nimsuggest.nim"
+if not dirExists"dist/nimble":
+  echo "[Error] This script only works for the tarball."
+else:
+  let nimbleExe = "./bin/nimble".toExe
+  selfExec "c --noNimblePath -p:compiler -o:" & nimbleExe &
+      " dist/nimble/src/nimble.nim"
 
-let nimgrepExe = "./bin/nimgrep".toExe
-selfExec "c -o:./bin/nimgrep tools/nimgrep.nim"
+  let nimsugExe = "./bin/nimsuggest".toExe
+  selfExec "c --noNimblePath -d:release -p:compiler -o:" & nimsugExe &
+      " dist/nimsuggest/nimsuggest.nim"
+
+  let nimgrepExe = "./bin/nimgrep".toExe
+  selfExec "c -d:release -o:" & nimgrepExe & " tools/nimgrep.nim"