1. Eric Dowd
  2. gentoo_bootstrap

Commits

Eric Dowd  committed f81d61d

Figure out OWNER rather than hard coding it

  • Participants
  • Parent commits 49f4672
  • Branches master

Comments (0)

Files changed (1)

File copy_ebs_across_region.sh

View file
  • Ignore whitespace
 #!/bin/bash
 
-OWNER="902460189751"
-
 from_region=$1
 architecture=$2
 to_region=$3
 
 latest_image=`ec2-describe-images \
 --region $from_region \
---owner $OWNER \
+--owner self \
 --filter image-type=machine \
 --filter is-public=true \
 --filter manifest-location=*/Gentoo_* \
 
 echo "$building $start_time - `date +%Y-%m-%dT%H:%M:%S`: latest_image = $latest_image"
 
+
+echo "$building $start_time - `date +%Y-%m-%dT%H:%M:%S`: finding owner"
+OWNER=`echo $latest_image | sed -e "s/\/.*//g"`
+echo "$building $start_time - `date +%Y-%m-%dT%H:%M:%S`: owner = $OWNER"
+
 echo "$building $start_time - `date +%Y-%m-%dT%H:%M:%S`: finding from ami"
 
 from_ami=`echo $latest_image | awk '{ print $2 }'`