Created
October 14, 2012 22:59
-
-
Save pupadupa/3890085 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Hadoop < Formula | |
homepage 'http://hadoop.apache.org/common/' | |
url 'http://www.sai.msu.su/apache/hadoop/common/hadoop-0.23.1/hadoop-0.23.1.tar.gz' | |
def shim_script target | |
<<-EOS.undent | |
#!/bin/bash | |
exec "#{libexec}/bin/#{target}" "$@" | |
EOS | |
end | |
def install | |
rm_f Dir["bin/*.bat"] | |
libexec.install %w[bin lib libexec sbin share etc] | |
#libexec.install Dir['*.jar'] | |
bin.mkpath | |
Dir["#{libexec}/bin/*"].each do |b| | |
n = Pathname.new(b).basename | |
(bin+n).write shim_script(n) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
BTW, you could change url and add md5