nixos ec2/create-amis.sh: shellcheck: read without -r mangles backslashes

This commit is contained in:
Graham Christensen 2020-10-29 14:01:22 -04:00
parent baf7ed3f24
commit a66a22ca54
No known key found for this signature in database
GPG Key ID: FE918C3A98C1030F

View File

@ -111,7 +111,7 @@ wait_for_import() {
local state snapshot_id local state snapshot_id
log "Waiting for import task $task_id to be completed" log "Waiting for import task $task_id to be completed"
while true; do while true; do
read state progress snapshot_id < <( read -r state progress snapshot_id < <(
aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \ aws ec2 describe-import-snapshot-tasks --region "$region" --import-task-ids "$task_id" | \
jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"' jq -r '.ImportSnapshotTasks[].SnapshotTaskDetail | "\(.Status) \(.Progress) \(.SnapshotId)"'
) )
@ -139,7 +139,7 @@ wait_for_image() {
log "Waiting for image $ami_id to be available" log "Waiting for image $ami_id to be available"
while true; do while true; do
read state < <( read -r state < <(
aws ec2 describe-images --image-ids "$ami_id" --region "$region" | \ aws ec2 describe-images --image-ids "$ami_id" --region "$region" | \
jq -r ".Images[].State" jq -r ".Images[].State"
) )