diff options
| author | Adam Vandenberg | 2010-05-19 20:14:41 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-05-19 20:18:18 -0700 |
| commit | c227f4f4357b787f75acca7e53e8f240ddac1173 (patch) | |
| tree | e60fc10feb120014da8e264202f827acb7e984c8 /Library/Formula | |
| parent | b38189029835a85fdc03b55b1cd42b2dbf67cf9e (diff) | |
| download | homebrew-c227f4f4357b787f75acca7e53e8f240ddac1173.tar.bz2 | |
Clean up ec2-api-tools
Modernize the brew and clean up the instructions.
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/ec2-api-tools.rb | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/Library/Formula/ec2-api-tools.rb b/Library/Formula/ec2-api-tools.rb index aa38632ce..be7d3841a 100644 --- a/Library/Formula/ec2-api-tools.rb +++ b/Library/Formula/ec2-api-tools.rb @@ -1,56 +1,46 @@ require 'formula' class Ec2ApiTools <Formula - @homepage='http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351' - @url='http://ec2-downloads.s3.amazonaws.com/ec2-api-tools-1.3-51254.zip' - @md5='4644d3984009f576b1c34c6d60086e60' - + homepage 'http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351' + url 'http://ec2-downloads.s3.amazonaws.com/ec2-api-tools-1.3-51254.zip' + md5 '4644d3984009f576b1c34c6d60086e60' + def patches # (From http://gist.github.com/200283) Gets rid of the # "[Deprecated] Xalan: org.apache.xml.res.XMLErrorResources_en_US" # messages that the tools spew on 1.3-41620 under Snow Leopard DATA end - + def install - # Nothing to be done but copying things into place - FileUtils.rm Dir['bin/*\.cmd'] - - (prefix+bin).install Dir['bin/ec2-*'] - prefix.install 'lib' + rm Dir['bin/*.cmd'] # Remove Windows versions + bin.install Dir['bin/ec2-*'] # Install commands to bin + prefix.install 'lib' # Put the .jars in prefix/lib end - - def caveats - return <<-EOS -Before you can utilize the EC2 API tools, you must export several environment -variables to your $SHELL. The easiest way to do this is to add them to your -dotfiles. If you're running the `bash` shell (the default), you'll want to add -them to `~/.bash_profile`. If this is the case, run `nano ~/.bash_profile` at -a terminal to edit said file. zsh users will want to edit `~/.zprofile` -instead. - export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home/" - export EC2_HOME="#{prefix}/" - -However, you're still not ready to use the tools. You need to download your -X.509 certificate and private key from Amazon Web Services. These files are -available at the following URL: + def caveats + <<-EOS.undent + Before you can use these tools you must export some variables to your $SHELL + and download your X.509 certificate and private key from Amazon Web Services. -http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key + Your certificate and private key are available at: + http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key -You should download two `.pem` files, one starting with `pk-`, and one -starting with `cert-`. You need to put both into a folder in your home -directory, `~/.ec2`, and then add the following to your profile file: + Download two ".pem" files, one starting with `pk-`, and one starting with `cert-`. + You need to put both into a folder in your home directory, `~/.ec2`. - export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)" - export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)" + To export the needed variables, add them to your dotfiles. + * On Bash, add them to `~/.bash_profile`. + * On Zsh, add them to `~/.zprofile` instead. + export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home/" + export EC2_HOME="#{prefix}/" + export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)" + export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)" EOS end - end - __END__ diff --git i/bin/ec2-cmd w/bin/ec2-cmd index 57051eb..edc2aae 100755 |
