From: Kiefer Chang Date: Tue, 3 Dec 2019 06:03:21 +0000 (+0800) Subject: vstart: fix error when getting CMake variables with the same prefix X-Git-Tag: v15.1.0~695^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=f4c8cc1293db50731b750279d5956fb4578c2942;p=ceph-ci.git vstart: fix error when getting CMake variables with the same prefix The function fails to work when there are multiple variables starts with the same prefix. e.g. - WITH_RBD - WITH_RBD_RGW Fixes: https://tracker.ceph.com/issues/43095 Signed-off-by: Kiefer Chang --- diff --git a/src/vstart.sh b/src/vstart.sh index a2a4e35f4c0..7de78b75c23 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -47,7 +47,7 @@ fi get_cmake_variable() { local variable=$1 - grep "$variable" CMakeCache.txt | cut -d "=" -f 2 + grep "${variable}:" CMakeCache.txt | cut -d "=" -f 2 } # for running out of the CMake build directory