aws-cloudsearch: set envs using env_script_all_files
Closes Homebrew/homebrew#38703. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
2b83cc34f4
commit
a753bdca89
1 changed files with 4 additions and 11 deletions
|
@ -8,20 +8,13 @@ class AwsCloudsearch < Formula
|
||||||
|
|
||||||
def install
|
def install
|
||||||
inreplace "bin/cs-cmd", 'LIBDIR="${CS_HOME}/lib"', 'LIBDIR="${CS_HOME}/jars/lib"'
|
inreplace "bin/cs-cmd", 'LIBDIR="${CS_HOME}/lib"', 'LIBDIR="${CS_HOME}/jars/lib"'
|
||||||
(prefix/"jars").install "lib"
|
(libexec/"jars").install "lib"
|
||||||
prefix.install %w[bin conf help third-party]
|
libexec.install %w[conf help third-party]
|
||||||
end
|
bin.install Dir["bin/*"]
|
||||||
|
bin.env_script_all_files(libexec/"bin", Language::Java.java_home_env("1.7+").merge(:CS_HOME => libexec))
|
||||||
def caveats; <<-EOS.undent
|
|
||||||
Add these to your shell profile:
|
|
||||||
export JAVA_HOME="$(/usr/libexec/java_home)"
|
|
||||||
export CS_HOME="#{prefix}"
|
|
||||||
EOS
|
|
||||||
end
|
end
|
||||||
|
|
||||||
test do
|
test do
|
||||||
ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp
|
|
||||||
ENV["CS_HOME"] = prefix
|
|
||||||
system "#{bin}/cs-configure-from-batches", "-h"
|
system "#{bin}/cs-configure-from-batches", "-h"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue