diff options
| author | Xu Cheng | 2015-03-03 19:07:06 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-03-03 21:18:01 +0800 |
| commit | fbaf5752a7784d28dc25a607821b21070b95e40f (patch) | |
| tree | aaca6e84a9386a3cece8ace3959529cb14b87359 /Library/Formula | |
| parent | 37e8259783f23a4cb3fcdb6ee192b320e5d32d12 (diff) | |
| download | homebrew-fbaf5752a7784d28dc25a607821b21070b95e40f.tar.bz2 | |
aws-sns-cli: drop AmazonWebServicesFormula
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/aws-sns-cli.rb | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/Library/Formula/aws-sns-cli.rb b/Library/Formula/aws-sns-cli.rb index 36cbf1a9d..512a17928 100644 --- a/Library/Formula/aws-sns-cli.rb +++ b/Library/Formula/aws-sns-cli.rb @@ -1,29 +1,35 @@ -class AwsSnsCli < AmazonWebServicesFormula +class AwsSnsCli < Formula homepage "https://aws.amazon.com/developertools/3688" url "https://sns-public-resources.s3.amazonaws.com/SimpleNotificationServiceCli-2010-03-31.zip" # The version in the tarball is the API version; this is the tool version version "2013-09-27" sha1 "192bd9e682f2b27a3c10f207f7a85c65dcaae471" + depends_on :java + def install + env = Language::Java.java_home_env.merge(:AWS_SNS_HOME => libexec) rm Dir["bin/*.cmd"] # Remove Windows versions - - # There is a "service" binary, which of course will conflict with any number - # other brews that have a generically named tool. So don't just blindly - # install bin to the prefix. - jars = prefix/"jars" - jars.install "bin", "lib" - chmod 0755, Dir["#{jars}/bin/*"] - bin.install_symlink Dir["#{jars}/bin/sns-*"] + chmod 0755, Dir["bin/*"] + 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 - standard_instructions "AWS_SNS_HOME", prefix/"jars" + <<-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 end test do - ENV["JAVA_HOME"] = `/usr/libexec/java_home`.chomp - ENV["AWS_SNS_HOME"] = prefix/"jars" assert_match /w.x.y.z/, shell_output("#{bin}/sns-version") end end |
