Reformat CMake: Fix version detection
We now only check the version of `cmake-format`, if the command was
found. Before this update the script would report an error about a
missing command, if `cmake-format` was not installed.
SCRIPTS_DIR=$(dirname "$0")
. "${SCRIPTS_DIR}/include-common"
-CMAKE_FORMAT=$(which cmake-format)
-CMAKE_FORMAT_VERSION=$("$CMAKE_FORMAT" --version)
+CMAKE_FORMAT=$(which cmake-format) && CMAKE_FORMAT_VERSION=$("$CMAKE_FORMAT" --version)
if [ -z "${CMAKE_FORMAT}" ] || [ "$CMAKE_FORMAT_VERSION" != "0.5.4" ]; then
printf 2>&1 'Please install `cmake-format` version 0.5.4\n'
