implemented multi methods
This commit is contained in:
parent
66a7e3d37c
commit
3f3dda5a77
65 changed files with 11086 additions and 1258 deletions
|
|
@ -2,8 +2,9 @@
|
|||
|
||||
import strutils, os
|
||||
|
||||
proc newName(f: string): string =
|
||||
return extractDir(f) / "trim_" & extractFilename(f)
|
||||
proc newName(f: string): string =
|
||||
var (dir, name, ext) = splitFile(f)
|
||||
return dir / "trim_" & name & ext
|
||||
|
||||
proc walker(dir: string) =
|
||||
for kind, path in walkDir(dir):
|
||||
|
|
@ -11,7 +12,7 @@ proc walker(dir: string) =
|
|||
of pcFile:
|
||||
moveFile(newName(path), path)
|
||||
# test if installation still works:
|
||||
if executeShellCommand(r"nimrod c --force_build tests\tlastmod") == 0:
|
||||
if execShellCmd(r"nimrod c --force_build tests\tlastmod") == 0:
|
||||
echo "Optional: ", path
|
||||
removeFile(newName(path))
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue