diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ef09d5e --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +nimcache/ +nimblecache/ +htmldocs/ \ No newline at end of file diff --git a/push_c_code.nim b/push_c_code.nim new file mode 100644 index 0000000..88e23e7 --- /dev/null +++ b/push_c_code.nim @@ -0,0 +1,21 @@ +import std/os + +proc exec(cmd: string) = + if execShellCmd(cmd) != 0: quit("FAILURE " & cmd) + +proc main() = + if not dirExists(".git"): + quit "[Error] no csources git repository found" + + copyDir("../nimv2/build", getCurrentDir()) + + for kind, path in walkDir("c_code"): + if kind == pcDir: + exec("git add " & path / "*.c") + + exec("git add makefile") + exec("git add *.sh") + exec("git add *.bat") + exec("git add c_code/*.h") + +main() \ No newline at end of file