diff options
author | Timothy DeHerrera <tim.deh@pm.me> | 2021-09-14 18:29:18 -0600 |
---|---|---|
committer | Jonathan Ringer <jonringer@users.noreply.github.com> | 2021-10-03 19:03:28 -0700 |
commit | 0543f2d2f62dcc3d5e917f34d3c0526d0548473f (patch) | |
tree | fbefb56d627f9a4e1072901fd3caafadcacc289d /nixos/maintainers | |
parent | 7433823ba70e85e970ba7054796b89cb68c8cfa0 (diff) |
create-amis.sh: make vars overridable from env
Diffstat (limited to 'nixos/maintainers')
-rwxr-xr-x | nixos/maintainers/scripts/ec2/create-amis.sh | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/nixos/maintainers/scripts/ec2/create-amis.sh b/nixos/maintainers/scripts/ec2/create-amis.sh index 691d7fcfcba4..560b761508e8 100755 --- a/nixos/maintainers/scripts/ec2/create-amis.sh +++ b/nixos/maintainers/scripts/ec2/create-amis.sh @@ -15,18 +15,22 @@ # set -x set -euo pipefail +var () { true; } + # configuration -state_dir=$HOME/amis/ec2-images -home_region=eu-west-1 -bucket=nixos-amis -service_role_name=vmimport +var ${state_dir:=$HOME/amis/ec2-images} +var ${home_region:=eu-west-1} +var ${bucket:=nixos-amis} +var ${service_role_name:=vmimport} -regions=(eu-west-1 eu-west-2 eu-west-3 eu-central-1 eu-north-1 +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 |