6 gemname = File.basename(File.dirname(File.expand_path __FILE__))
9 repository, dir = 'https://github.com/mruby/mruby.git', 'tmp/mruby'
11 build_args = ['all', 'test'] if build_args.nil? or build_args.empty?
13 Dir.mkdir 'tmp' unless File.exist?('tmp')
14 unless File.exist?(dir)
15 system "git clone #{repository} #{dir}"
18 exit system(%Q[cd #{dir}; MRUBY_CONFIG=#{File.expand_path __FILE__} ruby minirake #{build_args.join(' ')}])
21 MRuby::Build.new do |conf|
25 conf.gem File.expand_path(File.dirname(__FILE__))