]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: do_cmake.sh: get rid of which dependency
authorNathan Cutler <ncutler@suse.com>
Mon, 19 Feb 2018 14:13:15 +0000 (15:13 +0100)
committerNathan Cutler <ncutler@suse.com>
Mon, 23 Apr 2018 08:50:04 +0000 (10:50 +0200)
"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>
do_cmake.sh

index 5c15f4b58b64a60108f0d2111cb3c7f7582edbea..b2d7594ae91fd89d4d2a38cef5bb164e78419127 100755 (executable)
@@ -5,7 +5,7 @@ if test -e build; then
     exit 1
 fi
 
-if which ccache ; then
+if type ccache > /dev/null 2>&1 ; then
     echo "enabling ccache"
     ARGS="$ARGS -DWITH_CCACHE=ON"
 fi