From 2aea69a71f2e4fd1388b3bc486e6472551371316 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Mon, 19 Mar 2012 11:04:38 -0700 Subject: [PATCH] Moved to central dir, since people will be using this alot... --- tools/os-euca.sh => euca.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) rename tools/os-euca.sh => euca.sh (85%) diff --git a/tools/os-euca.sh b/euca.sh similarity index 85% rename from tools/os-euca.sh rename to euca.sh index 4fcead80..7ce11f59 100755 --- a/tools/os-euca.sh +++ b/euca.sh @@ -4,7 +4,7 @@ # Create EC2 credentials for the current user as defined by OS_TENANT_NAME:OS_USERNAME -set -x +ME=`basename $0` if [[ -n "$1" ]]; then USERNAME=$1 @@ -15,11 +15,21 @@ if [[ -n "$2" ]]; then fi # Find the other rc files -RC_DIR=../ CORE_RC="os-core.rc" +GEN_CMD="stack -a install" + +if [ ! -f $CORE_RC ]; +then + echo "File '$CORE_RC' needed before running '$ME'" + echo "Please run './$GEN_CMD' to get this file." + exit 1 +fi + +# Now we start showing whats happening +set -x # Get user configuration -source $RC_DIR/$CORE_RC +source $CORE_RC # Set the ec2 url so euca2ools works export EC2_URL=$(keystone catalog --service ec2 | awk '/ publicURL / { print $4 }')