-# tests whether the last action worked or not, and if not, it issues the
-# complaint passed as the arguments.
-function check_if_failed()
-{
- if [ $? -ne 0 ]; then
- echo "Step FAILed: $*"
- return 1
- fi
-}
-
-# uses the failure checking function, but actually exits out of the script
-# if there was a failure detected.
-function exit_if_failed()
-{
- check_if_failed $*
- if [ $? -ne 0 ]; then
- exit 1
- fi
-}
-