Skip to content

Commit

Permalink
create-amis.sh: make vars overridable from env
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy DeHerrera authored and Jonathan Ringer committed Oct 4, 2021
1 parent 7433823 commit 0543f2d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions nixos/maintainers/scripts/ec2/create-amis.sh
Expand Up @@ -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
Expand Down

0 comments on commit 0543f2d

Please sign in to comment.