jruby - take advantage of FileUtils being included in Formula.
This commit is contained in:
parent
d88b652558
commit
608d5b6fd2
1 changed files with 8 additions and 10 deletions
|
@ -1,27 +1,25 @@
|
|||
require 'formula'
|
||||
|
||||
# My god! 20,000 files?!
|
||||
# TODO trim that a bit? Seems crazy.
|
||||
|
||||
class Jruby < Formula
|
||||
url 'http://jruby.kenai.com/downloads/1.4.0/jruby-bin-1.4.0.tar.gz'
|
||||
homepage 'http://www.jruby.org'
|
||||
md5 'f37322c18e9134e91e064aebb4baa4c7'
|
||||
|
||||
def install
|
||||
# Remove Windows files
|
||||
rm Dir['bin/*.{bat,dll,exe}']
|
||||
|
||||
# Prefix a 'j' on some commands
|
||||
Dir.chdir 'bin' do
|
||||
FileUtils.rm Dir['*.bat']
|
||||
FileUtils.rm Dir['*.exe']
|
||||
FileUtils.rm Dir['*.dll']
|
||||
Dir['*'].each do |file|
|
||||
FileUtils.mv file, "j#{file}" unless file.match /^[j_]/
|
||||
mv file, "j#{file}" unless file.match /^[j_]/
|
||||
end
|
||||
end
|
||||
|
||||
# Only keep the MacOSX native libraries
|
||||
|
||||
# Only keep the OS X native libraries
|
||||
Dir.chdir 'lib/native' do
|
||||
Dir['*'].each do |file|
|
||||
FileUtils.rm_rf file unless file == 'darwin'
|
||||
rm_rf file unless file == 'darwin'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue