GAEなどでファイル数の多いライブラリを使うために、gemのパッケージから不要そうなファイルを消してjarファイルにまとめるために作ったスクリプトです。
1 #!/usr/bin/env ruby 2 3 def run(command) 4 puts command 5 system command 6 end 7 8 case ARGV[0] 9 when 'install' 10 run "jgem install -i ./gems --no-ri --no-rdoc #{ARGV[1]}" 11 when 'uninstall' 12 run "jgem uninstall -i ./gems #{ARGV[1]}" 13 end 14 15 Dir['gems/gems/ *'].each do |dir| 16 %w( 17 Generaters TODO README.* README 18 spec/**/* test/**/* examples/**/* tasks/**/* 19 tutorial/**/* demo/**/* website/**/* 20 CHANGES CHANGES.tx t CHANGELOG 21 LICENSE MIT-LICENS E Rakefile CONTRIBUTO RS 22 Manifest.t xt History.tx t install.rb setup.rb 23 ).each do |pattern| 24 Dir[File.join(dir, pattern)].each do |path| 25 run "rm -rf #{path}" 26 end 27 end 28 end 29 30 Dir['gems/cache ', 'gems/bin', 'gems/doc'].each do |path| 31 run "rm -rf #{path}" 32 end 33 34 run "jar cf lib/merb.j ar -C ./gems ."
posted by
genki
on Mon 7 Sep 2009
at 19:16
with
2 comments
genki any chance you will update your Copy-On-Select SIMBL plugin for Terminal.app so that it works with Snow Leopard and SIMBL 0.9.5b ? thank you very much ! Marino
I want to do it but I have not Snow Leopard yet. I will upgrade my Macbook soon after finishing current tasks. (It takes time a bit, but) Please wait for it :-)