aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorKarsten Sperling2012-05-04 18:52:46 +1200
committerAdam Vandenberg2012-06-07 21:39:42 -0700
commite5192e3fa910f3536976f9b92b41a35fb7715a15 (patch)
tree189b7dd9fb624ac38d266203db91a224d2408e33 /Library
parentf05a2b611f6a0daebadc9a6d269c182a401a1a3d (diff)
downloadhomebrew-e5192e3fa910f3536976f9b92b41a35fb7715a15.tar.bz2
Point AWS environment variables at LinkedKeg
(rather than the version being installed) This avoids having to change the variable when a different version is linked. Also ensure the private key / cert variables point to only 1 file. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula_specialties.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_specialties.rb b/Library/Homebrew/formula_specialties.rb
index 330b51c3e..6cae0887f 100644
--- a/Library/Homebrew/formula_specialties.rb
+++ b/Library/Homebrew/formula_specialties.rb
@@ -30,7 +30,7 @@ class AmazonWebServicesFormula < Formula
end
# Use this method to generate standard caveats.
- def standard_instructions var_name, var_value=prefix+'jars'
+ def standard_instructions var_name, var_value=linked_keg+'jars'
<<-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.
@@ -46,8 +46,8 @@ class AmazonWebServicesFormula < Formula
* On Zsh, add them to `~/.zprofile` instead.
export JAVA_HOME="$(/usr/libexec/java_home)"
- export EC2_PRIVATE_KEY="$(/bin/ls $HOME/.ec2/pk-*.pem)"
- export EC2_CERT="$(/bin/ls $HOME/.ec2/cert-*.pem)"
+ export EC2_PRIVATE_KEY="$(/bin/ls "$HOME"/.ec2/pk-*.pem | /usr/bin/head -1)"
+ export EC2_CERT="$(/bin/ls "$HOME"/.ec2/cert-*.pem | /usr/bin/head -1)"
export #{var_name}="#{var_value}"
EOS
end