3
0
Fork 0
forked from mirrors/nixpkgs

create-amis.sh: make vars overridable from env

This commit is contained in:
Timothy DeHerrera 2021-09-14 18:29:18 -06:00 committed by Jonathan Ringer
parent 7433823ba7
commit 0543f2d2f6

View file

@ -15,18 +15,22 @@
# set -x
set -euo pipefail
# configuration
state_dir=$HOME/amis/ec2-images
home_region=eu-west-1
bucket=nixos-amis
service_role_name=vmimport
var () { true; }
regions=(eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1
# configuration
var ${state_dir:=$HOME/amis/ec2-images}
var ${home_region:=eu-west-1}
var ${bucket:=nixos-amis}
var ${service_role_name:=vmimport}
var ${regions:=eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1
us-east-1 us-east-2 us-west-1 us-west-2
ca-central-1
ap-southeast-1 ap-southeast-2 ap-northeast-1 ap-northeast-2
ap-south-1 ap-east-1
sa-east-1)
sa-east-1}
regions=($regions)
log() {
echo "$@" >&2