diff options
Diffstat (limited to 'tests/manyloc/keineschweine/dependencies/nake')
-rw-r--r-- | tests/manyloc/keineschweine/dependencies/nake/nake.nim | 13 | ||||
-rw-r--r-- | tests/manyloc/keineschweine/dependencies/nake/nakefile.nim | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/manyloc/keineschweine/dependencies/nake/nake.nim b/tests/manyloc/keineschweine/dependencies/nake/nake.nim index 5341c1079..36538097e 100644 --- a/tests/manyloc/keineschweine/dependencies/nake/nake.nim +++ b/tests/manyloc/keineschweine/dependencies/nake/nake.nim @@ -7,6 +7,10 @@ contents thereof. As said in the Olde Country, `Keepe it Gangster'.""" +#[ +xxx remove this? seems mostly duplicate of: tests/manyloc/nake/nake.nim +]# + import strutils, parseopt, tables, os type @@ -50,8 +54,8 @@ template withDir*(dir: string; body: stmt): stmt = body cd(curDir) -when isMainModule: - if not existsFile("nakefile.nim"): +when true: + if not fileExists("nakefile.nim"): echo "No nakefile.nim found. Current working dir is ", getCurrentDir() quit 1 var args = "" @@ -60,11 +64,12 @@ when isMainModule: args.add " " quit(shell("nim", "c", "-r", "nakefile.nim", args)) else: - addQuitProc(proc() {.noconv.} = + import std/exitprocs + addExitProc(proc() {.noconv.} = var task: string printTaskList: bool - for kind, key, val in getOpt(): + for kind, key, val in getopt(): case kind of cmdLongOption, cmdShortOption: case key.tolower diff --git a/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim b/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim index bdf2139c9..5490211de 100644 --- a/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim +++ b/tests/manyloc/keineschweine/dependencies/nake/nakefile.nim @@ -7,7 +7,7 @@ task "install", "compile and install nake binary": 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 + let ans = stdin.readLine().toLowerAscii var index = 0 case ans of "q", "quit", "x", "exit": |