ubuntu-server-cloudimg-modify.sh: shellcheck fixes 37/30137/1
authorRoss Brattain <ross.b.brattain@intel.com>
Thu, 9 Mar 2017 08:53:12 +0000 (00:53 -0800)
committerRoss Brattain <ross.b.brattain@intel.com>
Thu, 9 Mar 2017 08:54:10 +0000 (00:54 -0800)
fixes for shellcheck warning

ubuntu-server-cloudimg-modify.sh:51:23: warning: Quote this to prevent word splitting. [SC2046]
ubuntu-server-cloudimg-modify.sh:51:30: note: Double quote to prevent globbing and word splitting. [SC2086]

Change-Id: I6cff0713a0471e5ce94211d42a7c8b45e3761c4d
Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
tools/ubuntu-server-cloudimg-modify.sh

index ce320a2..5067115 100755 (executable)
@@ -48,7 +48,7 @@ EOF
 apt-get update
 if [[ "${YARD_IMG_ARCH}" = "arm64" && "$release" = "vivid" ]]; then
     apt-get install -y \
-        linux-headers-$(echo $CLOUD_KERNEL_VERSION | cut -d'-' -f3,4,5) \
+        linux-headers-"$(echo ${CLOUD_KERNEL_VERSION} | cut -d'-' -f3,4,5)" \
         unzip
     #resize root partition (/dev/vdb1) It is supposed to be default but the image is booted differently for arm64
 cat <<EOF >/etc/cloud/cloud.cfg.d/15_growpart.cfg