diff options
| author | Adam Vandenberg | 2010-05-05 08:48:41 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-05-05 08:48:41 -0700 |
| commit | 2b8f5fd8f99e0ab2c2d576bdd4d7815f683c64bb (patch) | |
| tree | 73521b9d1f88f4465b4c60d69a58c02231319157 /Library | |
| parent | ea67afbbb8152c95830e83c77348b52a81e39ccc (diff) | |
| download | homebrew-2b8f5fd8f99e0ab2c2d576bdd4d7815f683c64bb.tar.bz2 | |
Update hadoop to install to libexec.
Install Hadoop to libexec, and then create shim scripts for the binaries
that run from the installed location.
This prevents PREFIX/lib from being spammed with jars.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/hadoop.rb | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/Library/Formula/hadoop.rb b/Library/Formula/hadoop.rb index de723b09d..a4bd78e92 100644 --- a/Library/Formula/hadoop.rb +++ b/Library/Formula/hadoop.rb @@ -5,8 +5,27 @@ class Hadoop < Formula homepage 'http://hadoop.apache.org/common/' md5 '8f40198ed18bef28aeea1401ec536cb9' + def shim_script target + <<-EOS.undent + #!/usr/bin/env bash + cd #{libexec}/bin + ./#{target} $* + EOS + end + def install rm_f Dir["bin/*.bat"] - prefix.install %w[bin conf contrib lib] + libexec.install %w[bin conf contrib lib] + bin.mkpath + Dir["#{libexec}/bin/*"].each do |b| + n = Pathname.new(b).basename + (bin+n).write shim_script(n) + end + end + + def caveats + <<-EOS.undent + $JAVA_HOME must be set for Hadoop commands to work. + EOS end end |
