From 5f313f0458352a192c3cf26ad6ac329eb587dd76 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 1 Jul 2016 11:31:04 -0700 Subject: [PATCH] mrun, mstart.sh, mstop.sh: search for cmake build directory Search for the default cmake build directory, use it if found Signed-off-by: Yehuda Sadeh --- src/mrun | 4 ++++ src/mstart.sh | 3 +++ src/mstop.sh | 2 ++ 3 files changed, 9 insertions(+) diff --git a/src/mrun b/src/mrun index 407f360a0cc6..cdf34a83b63a 100755 --- a/src/mrun +++ b/src/mrun @@ -11,6 +11,10 @@ CEPH_CONF_PATH=$root/run/$run_name if [ -e CMakeCache.txt ]; then CEPH_BIN=$PWD/bin CEPH_CONF_PATH=$PWD/run/$run_name +elif [ -e $root/../build/CMakeCache.txt ]; then + cd $root/../build + CEPH_BIN=$PWD/bin + CEPH_CONF_PATH=$PWD/run/$run_name fi shift 2 diff --git a/src/mstart.sh b/src/mstart.sh index 34e6cf7ea6c3..bbc8ecc5fe6a 100755 --- a/src/mstart.sh +++ b/src/mstart.sh @@ -20,6 +20,9 @@ root_path=`(cd $root_path; pwd)` if [ -e CMakeCache.txt ]; then root_path=$PWD +elif [ -e $root_path/../build/CMakeCache.txt ]; then + cd $root_path/../build + root_path=$PWD fi RUN_ROOT_PATH=${root_path}/run CLUSTERS_LIST=$RUN_ROOT_PATH/.clusters.list diff --git a/src/mstop.sh b/src/mstop.sh index 0f85482f6847..6aae78873615 100755 --- a/src/mstop.sh +++ b/src/mstop.sh @@ -6,6 +6,8 @@ script_root=`dirname $0` if [ -e CMakeCache.txt ]; then script_root=$PWD +elif [ -e $script_root/../build/CMakeCache.txt ]; then + script_root=`(cd $script_root/../build; pwd)` fi [ "$#" -lt 1 ] && echo "usage: $0 [entity [id]]" && exit 1 -- 2.47.3