summary refs log tree commit diff stats
path: root/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-04-13 21:55:02 +0200
committerAraq <rumpf_a@web.de>2013-04-13 21:55:02 +0200
commit75b508032b9da285f30d4ec7f2af4c63075b8611 (patch)
tree79476c0e8b7c70ee373bde21a2ea0a62d84520f8 /tests/manyloc/keineschweine/dependencies/nake/nakefile.nim
parent4f09794be9fb9b96728078712f01e990e0021929 (diff)
downloadNim-75b508032b9da285f30d4ec7f2af4c63075b8611.tar.gz
added manyloc test suite; --path now relative to project dir if not absolute
Diffstat (limited to 'tests/manyloc/keineschweine/dependencies/nake/nakefile.nim')
-rw-r--r--tests/manyloc/keineschweine/dependencies/nake/nakefile.nim23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim b/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim
new file mode 100644
index 000000000..24af63d10
--- /dev/null
+++ b/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim
@@ -0,0 +1,23 @@
+import nake
+nakeImports
+
+task "install", "compile and install nake binary":
+  if shell("nimrod", "c", "nake") == 0:
+    let path = getEnv("PATH").split(PathSep)
+    for index, dir in pairs(path):
+      echo "  ", index, ". ", dir
+    echo "Where to install nake binary? (quit with ^C or quit or exit)"
+    let ans = stdin.readLine().toLower
+    var index = 0
+    case ans
+    of "q", "quit", "x", "exit":
+      quit 0
+    else:
+      index = parseInt(ans)
+    if index > path.len or index < 0:
+      echo "Invalid index."
+      quit 1
+    moveFile "nake", path[index]/"nake"
+    echo "Great success!"
+
+