mirror of
https://github.com/ceph/ceph
synced 2024-12-22 19:34:30 +00:00
7a17722d45
"which" is not available on minimal systems, whereas "type" is a shell builtin, so the chances of the command "just working" are greater with type than with which. In other parts of Ceph build/ops we have replaced "which" with "type" to good effect. Signed-off-by: Nathan Cutler <ncutler@suse.com>
25 lines
451 B
Bash
Executable File
25 lines
451 B
Bash
Executable File
#!/bin/sh -x
|
|
git submodule update --init --recursive
|
|
if test -e build; then
|
|
echo 'build dir already exists; rm -rf build and re-run'
|
|
exit 1
|
|
fi
|
|
|
|
if type ccache > /dev/null 2>&1 ; then
|
|
echo "enabling ccache"
|
|
ARGS="$ARGS -DWITH_CCACHE=ON"
|
|
fi
|
|
|
|
mkdir build
|
|
cd build
|
|
NPROC=${NPROC:-$(nproc)}
|
|
cmake -DBOOST_J=$NPROC $ARGS "$@" ..
|
|
|
|
# minimal config to find plugins
|
|
cat <<EOF > ceph.conf
|
|
plugin dir = lib
|
|
erasure code dir = lib
|
|
EOF
|
|
|
|
echo done.
|