Don't use array to fix SC2027 shellcheck error 90/67890/10
authorSam Hague <shague@redhat.com>
Sat, 3 Feb 2018 16:07:18 +0000 (11:07 -0500)
committerSam Hague <shague@redhat.com>
Sun, 4 Feb 2018 15:22:40 +0000 (10:22 -0500)
Change-Id: I098ed786877cfb761050c6512acbccd1e644cccd
Signed-off-by: Sam Hague <shague@redhat.com>
jjb/integration/copy-common-functions.sh

index 8d3e85d73e3754e0b9b649e8d715fd352e9e4a23..e0eacdf0c1bb5dfba298f0790a1684e3f963a2ba 100644 (file)
@@ -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