Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

EC2 configuration.

  • Loading branch information...
commit 0461fb60f81a0fdf4fbc14ffee60e4cb51a2002e 1 parent 0401a99
@mathie authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 zshrc
View
14 zshrc
@@ -117,3 +117,17 @@ REPORTTIME=5
# Set the word style to the bash stylee I'm familiar with.
autoload -U select-word-style
select-word-style bash
+
+# Amazon EC2 configuration
+export EC2_HOME="${HOME}/.homebrew/Cellar/ec2-api-tools/1.5.2.3/jars"
+function ec2-set-role() {
+ export EC2_PRIVATE_KEY="${HOME}/.ec2/${1}-pk.pem"
+ export EC2_CERT="${HOME}/.ec2/${1}-cert.pem"
+
+ if [ ! -f ${EC2_PRIVATE_KEY} -o ! -f ${EC2_CERT} ]; then
+ echo "Certificate or private key for ${1} missing!"
+ unset EC2_PRIVATE_KEY EC2_CERT
+ return 1
+ fi
+}
+ec2-set-role rubaidh
Please sign in to comment.
Something went wrong with that request. Please try again.