2015-12-08 17:36:47 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
[ $# -lt 2 ] && echo "usage: $0 <name> <command> [params...]" && exit 1
|
|
|
|
|
|
|
|
root=`dirname $0`
|
|
|
|
run_name=$1
|
|
|
|
command=$2
|
2016-03-21 12:46:52 +00:00
|
|
|
CEPH_BIN=$root
|
|
|
|
CEPH_CONF_PATH=$root/run/$run_name
|
|
|
|
|
|
|
|
if [ -e CMakeCache.txt ]; then
|
2016-04-05 14:38:39 +00:00
|
|
|
CEPH_BIN=$PWD/bin
|
2016-03-21 12:46:52 +00:00
|
|
|
CEPH_CONF_PATH=$PWD/run/$run_name
|
2016-07-01 18:31:04 +00:00
|
|
|
elif [ -e $root/../build/CMakeCache.txt ]; then
|
|
|
|
cd $root/../build
|
|
|
|
CEPH_BIN=$PWD/bin
|
|
|
|
CEPH_CONF_PATH=$PWD/run/$run_name
|
2016-03-21 12:46:52 +00:00
|
|
|
fi
|
2015-12-08 17:36:47 +00:00
|
|
|
|
|
|
|
shift 2
|
|
|
|
|
2016-03-21 12:46:52 +00:00
|
|
|
$CEPH_BIN/$command -c $CEPH_CONF_PATH/ceph.conf "$@"
|