Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Java variables and ec2 switching

  • Loading branch information...
commit c4e16effbac63d2ead7c1a8e772c5a9f9dbf8677 1 parent a0e78a3
Jon Yurek authored
Showing with 14 additions and 3 deletions.
  1. +14 −3 bashrc
17 bashrc
View
@@ -124,9 +124,20 @@ function ey_account {
}
ey_account $EY_ACCOUNT
-export JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Home"
-export EC2_AMITOOL_HOME="/usr/local/Cellar/ec2-ami-tools/1.3-45758/jars"
-export EC2_HOME="/usr/local/Cellar/ec2-api-tools/1.3-62308/jars"
+function ec2env {
+ env=$1
+ export EC2_KEYS_HOME=~/.ec2${env:+"_${env}"}
+ . $EC2_KEYS_HOME/profile
+}
+ec2env backupifydev
+
+export JAVA_HOME="$(/usr/libexec/java_home)"
+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 EC2_AMITOOL_HOME="/usr/local/Library/LinkedKegs/ec2-ami-tools/jars"
+export EC2_HOME="/usr/local/Library/LinkedKegs/ec2-api-tools/jars"
+
+export CC=/usr/local/bin/gcc-4.2
if [ -f $BREW_HOME/etc/bash_completion ]; then
. $BREW_HOME/etc/bash_completion
Please sign in to comment.
Something went wrong with that request. Please try again.