diff options
author | Araq <rumpf_a@web.de> | 2011-02-20 21:58:30 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-02-20 21:58:30 +0100 |
commit | 61ddcf62b5916c83dbaa9861759519e2dab549f5 (patch) | |
tree | 259f81d2425f85654aab52a85b292d7bd0b9b94d /koch.nim | |
parent | c9d5c8268359e33569fc5361f206b33f303d70b3 (diff) | |
download | Nim-61ddcf62b5916c83dbaa9861759519e2dab549f5.tar.gz |
koch: 'git' command
Diffstat (limited to 'koch.nim')
-rwxr-xr-x | koch.nim | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/koch.nim b/koch.nim index 7458a747b..76039e721 100755 --- a/koch.nim +++ b/koch.nim @@ -33,11 +33,12 @@ Possible Commands: csource [options] builds the C sources for installation zip builds the installation ZIP package inno [options] builds the Inno Setup installer + git removes and adds generated C files to git Boot options: -d:release produce a release version of the compiler -d:tinyc include the Tiny C backend (not supported on Windows) -d:useGnuReadline use the GNU readline library for interactive mode - (not supported on Windows) + (not needed on Windows) """ proc exe(f: string): string = return addFileExt(f, ExeExt) @@ -75,6 +76,17 @@ proc web(args: string) = exec("nimrod cc -r tools/nimweb.nim web/nimrod --putenv:nimrodversion=$#" % NimrodVersion) +proc gitAux(dir: string) = + for kind, path in walkDir(dir): + if kind == pcDir: + var cfiles = path / "*.c" + exec("git rm " & cfiles) + exec("git add " & cfiles) + gitAux(path) + +proc git = + gitAux("build") + # -------------- nim ---------------------------------------------------------- proc compileNimCmd(args: string): string = |