Skip to content
Browse files

update submodules (take 2)

  • Loading branch information...
1 parent d14366e commit d7a7bf0ef2967cad75521dc38759b160df12e2c3 @RyanScottLewis committed Dec 24, 2012
Showing with 17 additions and 4 deletions.
  1. +17 −4 lib/rake/lua_mruby_tasks.rb
View
21 lib/rake/lua_mruby_tasks.rb
@@ -69,17 +69,30 @@ def run(command)
system command
end
+ def init_git
+ unless root.join('.git').exist?
+ run "cd #{root}"
+ run "git init"
+ run "git remote add origin https://github.com/RyanScottLewis/lua-mruby.git"
+ run "git pull origin master"
+ run "git submodule sync"
+ run "git submodule update --init lib/mruby/"
+ run "git submodule update --init lib/lua/"
+ end
+ end
+
def compile_lua
- run "cd #{root} && git init && git remote add origin https://github.com/RyanScottLewis/lua-mruby.git && git submodule update --init lib/lua/" unless root.join('.git').exist?
- run "cd #{lua} && make posix" # TODO: Not 100% sure this is needed...
+ init_git
+ # run "cd #{lua} && make posix" # TODO: Not 100% sure this is needed...
end
def compile_mruby
- run "cd #{root} && git init && git remote add origin https://github.com/RyanScottLewis/lua-mruby.git && git submodule update --init lib/mruby/" unless root.join('.git').exist?
- run "cd #{mruby} && git pull && make"
+ init_git
+ run "cd #{mruby} && make"
end
def compile_lua_mruby
+ init_git
package.mkpath
run "cd #{root} && #{command}"
end

0 comments on commit d7a7bf0

Please sign in to comment.
Something went wrong with that request. Please try again.