I want to write a shell script in which am going to use cmake build:
cmake ..
cmake --build .
After these 2 statements more statements are to be added in the script. But if the cmake build fails the shell script should exit. Is there any way to achieve this?