dyld-832.7.1.tar.gz
[apple/dyld.git] / build-scripts / include.sh
1 exit_if_error() {
2 local exit_code=$1
3 shift
4 [[ $exit_code ]] && # do nothing if no error code passed
5 ((exit_code != 0)) && { # do nothing if error code is 0
6 printf 'ERROR: %s\n' "$@" >&2 # we can use better logging here
7 exit "$exit_code" # we could also check to make sure
8 # error code is numeric when passed
9 }
10 }