Skip to content

Instantly share code, notes, and snippets.

@pupadupa
Created October 14, 2012 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pupadupa/3890085 to your computer and use it in GitHub Desktop.
Save pupadupa/3890085 to your computer and use it in GitHub Desktop.
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
@pupadupa
Copy link
Author

BTW, you could change url and add md5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment