Add error checking to install script
MODIFY
install
install
@@ -52,6 +52,13 @@ fi
eval set -- "${GETOPT_PARSE}"
+check_exit_code( )
+{
+ if (( $1 != 0 )); then
+ exit $1
+ fi
+}
+
while true; do
case "${1}" in
@@ -141,10 +148,11 @@ if [[ "${build_relocatable}" == true ]]; then
else
CXX=$rocm_path/bin/${compiler} ${cmake_executable} ${build_test} ../../. # or cmake-gui ../.
fi
-
+check_exit_code "$?"
# Build
make -j$(nproc)
+check_exit_code "$?"
if ($run_tests); then
# Optionally, run tests if they're enabled.
@@ -153,8 +161,10 @@ fi
if ($install_package); then
make install
+ check_exit_code "$?"
fi
if ($build_package); then
make package -j$(nproc)
+ check_exit_code "$?"
fi

Add error checking to install script (#104)