add script
This commit is contained in:
parent
cf589670ab
commit
c6c0eb027a
2 changed files with 24 additions and 0 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
nimcache/
|
||||
nimblecache/
|
||||
htmldocs/
|
||||
21
push_c_code.nim
Normal file
21
push_c_code.nim
Normal file
|
|
@ -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()
|
||||
Loading…
Add table
Add a link
Reference in a new issue