scripts/vagrant: do not treat SPDK_VAGRANT_DISTRO as array
Dash and double dash ("-" and "--") getopts params are safely shifted using "shift" and "OPTIND". After that it's safe to concatenate param array to string using "$*", especially that there is only 1 positional parameter, which is distro version. Previous approach ("$@" as array) made "export" impossible and as a result VM was created with Fedora 28 distro on each run. Change-Id: I48fa588220f8b7f46c561d480ee32920847c7903 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476128 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Maciej Wawryk <maciejx.wawryk@intel.com> Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
This commit is contained in:
parent
44ac51f00d
commit
4033c66071
@ -130,9 +130,9 @@ done
|
||||
|
||||
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
|
||||
centos7)
|
||||
export SPDK_VAGRANT_DISTRO
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user