diff options
| author | Xu Cheng | 2015-03-03 19:26:39 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-03-03 21:18:01 +0800 |
| commit | 21c5bf3389e559e0fdae5c8c0108cfd686a338e3 (patch) | |
| tree | 55c8875372cc29cfaed1acf0e9670bca3d4937d2 /Library/Formula/cloud-watch.rb | |
| parent | fbaf5752a7784d28dc25a607821b21070b95e40f (diff) | |
| download | homebrew-21c5bf3389e559e0fdae5c8c0108cfd686a338e3.tar.bz2 | |
cloud-watch: drop AmazonWebServicesFormula
Diffstat (limited to 'Library/Formula/cloud-watch.rb')
| -rw-r--r-- | Library/Formula/cloud-watch.rb | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/Library/Formula/cloud-watch.rb b/Library/Formula/cloud-watch.rb index d91dd8569..7f7e41939 100644 --- a/Library/Formula/cloud-watch.rb +++ b/Library/Formula/cloud-watch.rb @@ -1,21 +1,34 @@ -class CloudWatch < AmazonWebServicesFormula +class CloudWatch < Formula homepage "https://aws.amazon.com/developertools/2534" url "https://ec2-downloads.s3.amazonaws.com/CloudWatch-2010-08-01.zip" version "1.0.20.0" sha1 "c3f5b856b3ff8e1ae06d0ad5db5dd27c214c4881" + depends_on :java + + def install + env = Language::Java.java_home_env + env.merge! :AWS_CLOUDWATCH_HOME => libexec, :SERVICE_HOME => libexec + rm Dir["bin/*.cmd"] # Remove Windows versions + libexec.install Dir["*"] + Pathname.glob("#{libexec}/bin/*") do |file| + next if file.directory? + basename = file.basename + next if basename.to_s == "service" + (bin/basename).write_env_script file, env + end + end + def caveats - s = standard_instructions "AWS_CLOUDWATCH_HOME" - s += <<-EOS.undent - export SERVICE_HOME="$AWS_CLOUDWATCH_HOME" + <<-EOS.undent + Before you can use these tools you must export some variables to your $SHELL. + export AWS_ACCESS_KEY="<Your AWS Access ID>" + export AWS_SECRET_KEY="<Your AWS Secret Key>" + export AWS_CREDENTIAL_FILE="<Path to the credentials file>" EOS - s end test do - ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp - ENV["AWS_CLOUDWATCH_HOME"] = libexec - ENV["SERVICE_HOME"] = libexec assert_match /w.x.y.z/, shell_output("#{bin}/mon-version") end end |
