quantum-espresso/examples/check_failure.sh

10 lines
250 B
Bash

# function to test the exit status of a job
function check_failure() {
# usage: check_failure $?
if test $1 != 0; then
$ECHO "Error condition encountered during test: exit status = $1"
$ECHO "Aborting"
exit 1
fi
}