From: Sam Hague Date: Sat, 3 Feb 2018 16:07:18 +0000 (-0500) Subject: Don't use array to fix SC2027 shellcheck error X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=8a68d35fe5822e268ad07fef5dc4abc8a76092cc;p=releng%2Fbuilder.git Don't use array to fix SC2027 shellcheck error Change-Id: I098ed786877cfb761050c6512acbccd1e644cccd Signed-off-by: Sam Hague --- diff --git a/jjb/integration/copy-common-functions.sh b/jjb/integration/copy-common-functions.sh index 8d3e85d73..e0eacdf0c 100644 --- a/jjb/integration/copy-common-functions.sh +++ b/jjb/integration/copy-common-functions.sh @@ -12,9 +12,7 @@ if [ "${BASH_SOURCE[0]}" == "${0}" ]; then cp "${0}" /tmp/common-functions.sh source /tmp/v/openstack/bin/activate - # shellcheck disable=SC2207 - ips=($(openstack stack show -f json -c outputs "$STACK_NAME" | \ - jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')) + mapfile -t ips <<< "$(openstack stack show -f json -c outputs "$STACK_NAME" | jq -r '.outputs[] | select(.output_key | match("^vm_[0-9]+_ips$")) | .output_value | .[]')" for ip in "${ips[@]}"; do echo "Copying common-functions.sh to ${ip}:/tmp" scp /tmp/common-functions.sh ${ip}:/tmp