homebrew-core/Formula/jruby.rb
Joshua Peek 61d2c1e75e only jruby bin/ should be linked to the main tree
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2010-06-12 20:38:54 -07:00

37 lines
804 B
Ruby

require 'formula'
class Jruby < Formula
url 'http://jruby.org.s3.amazonaws.com/downloads/1.5.1/jruby-bin-1.5.1.tar.gz'
homepage 'http://www.jruby.org'
md5 '74251383e08e8c339cacc35a7900d3af'
def install
# Remove Windows files
rm Dir['bin/*.{bat,dll,exe}']
# Prefix a 'j' on some commands
Dir.chdir 'bin' do
Dir['*'].each do |file|
mv file, "j#{file}" unless file.match /^[j_]/
end
end
# Only keep the OS X native libraries
Dir.chdir 'lib/native' do
Dir['*'].each do |file|
rm_rf file unless file.downcase == 'darwin'
end
end
(prefix+'jruby').install Dir['*']
bin.mkpath
Dir["#{prefix}/jruby/bin/*"].each do |f|
ln_s f, bin+File.basename(f)
end
end
def test
system "jruby -e ''"
end
end