diff options
| author | Xu Cheng | 2015-04-16 15:16:02 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-04-16 18:23:38 +0800 |
| commit | 4ddf2355193b0d6b2278917824833bd980e7e4d6 (patch) | |
| tree | 3ba79d5a73d637b8d6b76af9d43a3f080ae2b69c /Library | |
| parent | c1f5100fd8528fdd7c17750b6cad1f6b59f4fb68 (diff) | |
| download | homebrew-4ddf2355193b0d6b2278917824833bd980e7e4d6.tar.bz2 | |
aws-cloudsearch: set envs using env_script_all_files
Closes #38703.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/aws-cloudsearch.rb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/Library/Formula/aws-cloudsearch.rb b/Library/Formula/aws-cloudsearch.rb index 2f7a9adb0..4bd3088ff 100644 --- a/Library/Formula/aws-cloudsearch.rb +++ b/Library/Formula/aws-cloudsearch.rb @@ -8,20 +8,13 @@ class AwsCloudsearch < Formula def install inreplace "bin/cs-cmd", 'LIBDIR="${CS_HOME}/lib"', 'LIBDIR="${CS_HOME}/jars/lib"' - (prefix/"jars").install "lib" - prefix.install %w[bin conf help third-party] - end - - def caveats; <<-EOS.undent - Add these to your shell profile: - export JAVA_HOME="$(/usr/libexec/java_home)" - export CS_HOME="#{prefix}" - EOS + (libexec/"jars").install "lib" + libexec.install %w[conf help third-party] + bin.install Dir["bin/*"] + bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.7+").merge(:CS_HOME => libexec)) end test do - ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp - ENV["CS_HOME"] = prefix system "#{bin}/cs-configure-from-batches", "-h" end end |
