diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-29 14:48:38 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2015-09-29 14:54:12 +0200 |
commit | 9008c9cd5f2148065c586cc13c1c16e819717736 (patch) | |
tree | 5b4f3b15f191d374aaf42f0668f699b515067161 /nixos/maintainers | |
parent | d06fdade6fe1fe63a89d9375c3a1da3458575cac (diff) |
Hack to parallelize AMI copying
Diffstat (limited to 'nixos/maintainers')
-rwxr-xr-x | nixos/maintainers/scripts/ec2/create-amis.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index cd4195adcfaa..8604091dbcdb 100755 --- a/nixos/maintainers/scripts/ec2/create-amis.sh +++ b/nixos/maintainers/scripts/ec2/create-amis.sh @@ -191,15 +191,17 @@ for type in hvm pv; do ami=$(cat $amiFile) fi - echo "waiting for AMI..." - while true; do - status=$(ec2-describe-images "$ami" --region "$region" | head -n1 | cut -f 5) - if [ "$status" = available ]; then break; fi - sleep 10 - done - - ec2-modify-image-attribute \ - --region "$region" "$ami" -l -a all + if [ -z "$NO_WAIT" -o -z "$prevAmi" ]; then + echo "waiting for AMI..." + while true; do + status=$(ec2-describe-images "$ami" --region "$region" | head -n1 | cut -f 5) + if [ "$status" = available ]; then break; fi + sleep 10 + done + + ec2-modify-image-attribute \ + --region "$region" "$ami" -l -a all + fi echo "region = $region, type = $type, store = $store, ami = $ami" if [ -z "$prevAmi" ]; then |