]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
vstart: fix error when getting CMake variables with the same prefix
authorKiefer Chang <kiefer.chang@suse.com>
Tue, 3 Dec 2019 06:03:21 +0000 (14:03 +0800)
committerKiefer Chang <kiefer.chang@suse.com>
Tue, 3 Dec 2019 06:15:33 +0000 (14:15 +0800)
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 <kiefer.chang@suse.com>
src/vstart.sh

index a2a4e35f4c09884ff2698286d18065710d98b755..7de78b75c238d6b5cc0ccee961311dc228eeab15 100755 (executable)
@@ -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