diff options
author | Araq <rumpf_a@web.de> | 2013-04-13 21:55:02 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-04-13 21:55:02 +0200 |
commit | 75b508032b9da285f30d4ec7f2af4c63075b8611 (patch) | |
tree | 79476c0e8b7c70ee373bde21a2ea0a62d84520f8 /tests/manyloc/keineschweine/dependencies/nake/nakefile.nim | |
parent | 4f09794be9fb9b96728078712f01e990e0021929 (diff) | |
download | Nim-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.nim | 23 |
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!" + + |