From 20bc88d284d36adbabbd4213528ccfea87d14e99 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Fri, 3 Apr 2020 11:41:03 +0200 Subject: [PATCH] scripts/vagrant: fix exporting array in bash script In create_vhost_vm we export SDPK_VAGRANT_DISTRO variable to vagrant subprocess that is called during the script. But if SPDK_VAGRANT_DISTRO is an array variable, then Vagrant will not see it and always default to ubuntu16. This small patch fixes that. Change-Id: I45e9ed4f847e4fa10b90650a613f9cfe17ee38e3 Signed-off-by: Vitaliy Mysak Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1676 Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Maciej Wawryk Reviewed-by: Shuhei Matsumoto Reviewed-by: Tomasz Zawadzki --- scripts/vagrant/create_vhost_vm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/vagrant/create_vhost_vm.sh b/scripts/vagrant/create_vhost_vm.sh index 35222c901..affc0fa3e 100755 --- a/scripts/vagrant/create_vhost_vm.sh +++ b/scripts/vagrant/create_vhost_vm.sh @@ -71,9 +71,9 @@ export INSTALL_DEPS shift "$((OPTIND-1))" # Discard the options and sentinel -- -SPDK_VAGRANT_DISTRO=( "$@" ) +SPDK_VAGRANT_DISTRO="$*" -case "${SPDK_VAGRANT_DISTRO[0]}" in +case "${SPDK_VAGRANT_DISTRO}" in ubuntu16) export SPDK_VAGRANT_DISTRO ;;