Skip to content

Commit

Permalink
allow someone to set the 'Name' tag when they build a box: export TAG…
Browse files Browse the repository at this point in the history
…=waffles bin/pave launch
  • Loading branch information
Jordan Babe committed Mar 27, 2013
1 parent e046148 commit 4ac555a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/pave
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,11 @@ if [ $LAUNCH ]; then

[[ -n $INSTANCE_TYPE && $REGION && $KEYPAIR && $AMI ]] || bail "invalid config"

TAG=${PWD##*/}
[[ $ROLE ]] && TAG+="_$ROLE"
TAG+="_$ENVIRONMENT"
if [ ! $TAG ]; then
TAG=${PWD##*/}
[[ $ROLE ]] && TAG+="_$ROLE"
TAG+="_$ENVIRONMENT"
fi

EC2_RUN_RESULT=$(ec2-run-instances --instance-type $INSTANCE_TYPE --group default --region $REGION --key $KEYPAIR $AMI)
INSTANCE_NAME=$(echo ${EC2_RUN_RESULT} | sed 's/RESERVATION.*INSTANCE //' | sed 's/ .*//')
Expand Down

0 comments on commit 4ac555a

Please sign in to comment.