tools: Trim .nim files trailing whitespace

via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
This commit is contained in:
Adam Strzelecki 2015-09-04 23:04:17 +02:00
commit ac9c1cd6b9
7 changed files with 251 additions and 251 deletions

View file

@ -1,16 +1,16 @@
import os, strutils
proc main(dir: string, wanted: string) =
for kind, path in walkDir(dir):
case kind
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
copyFile(path, newLoc)
of pcDir: main(path, wanted)
else: discard
main("dist/mingw_backup", paramStr(1))