cmake-utils.eclass: check exit codes of executed commands
authorNikoli <nikoli@gmx.us>
Mon, 25 Jan 2016 14:04:10 +0000 (01:04 +1100)
committerMichael Palimaka <kensington@gentoo.org>
Mon, 25 Jan 2016 14:07:03 +0000 (01:07 +1100)
Gentoo-bug: 544966

eclass/cmake-utils.eclass

index b0e9bb0213271e232e1e2a91ac44437161715859..58f93accb12342330e617b856d5478214a46c0a6 100644 (file)
@@ -219,7 +219,7 @@ _check_build_dir() {
        # Backwards compatibility for getting the value.
        CMAKE_BUILD_DIR=${BUILD_DIR}
 
-       mkdir -p "${BUILD_DIR}"
+       mkdir -p "${BUILD_DIR}" || die
        echo ">>> Working in BUILD_DIR: \"$BUILD_DIR\""
 }
 
@@ -431,7 +431,7 @@ enable_cmake-utils_src_configure() {
        [[ "${CMAKE_REMOVE_MODULES}" == "yes" ]] && {
                local name
                for name in ${CMAKE_REMOVE_MODULES_LIST} ; do
-                       find "${S}" -name ${name}.cmake -exec rm -v {} +
+                       find "${S}" -name ${name}.cmake -exec rm -v {} + || die
                done
        }