Search for the default cmake build directory, use it if found
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
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
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
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 <name> [entity [id]]" && exit 1