mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 08:54:53 +00:00
17 lines
404 B
Nim
17 lines
404 B
Nim
|
|
import os, strutils
|
|
|
|
proc main(dir: string, wanted: string) =
|
|
for kind, path in walkDir(dir):
|
|
case kind
|
|
of pcFile:
|
|
let name = extractFilename(path)
|
|
if name == wanted:
|
|
let newLoc = path.replace("mingw_backup", "mingw")
|
|
echo "creating ", newLoc
|
|
copyFile(path, newLoc)
|
|
of pcDir: main(path, wanted)
|
|
else: discard
|
|
|
|
main("dist/mingw_backup", paramStr(1))
|