x/xx: slightly more verbose error messages

Signed-off-by: Leah Rowe <leah@libreboot.org>
btrfsvols
Leah Rowe 2023-10-14 09:01:58 +01:00
parent 19f1e0083d
commit 65af756fc3
1 changed files with 9 additions and 2 deletions

View File

@ -4,10 +4,17 @@
version=""; versiondate=""; projectname=""
x_() {
[ $# -lt 1 ] || ${@} || err "non-zero exit status: ${@}"
[ $# -lt 1 ] || ${@} || err_exit err ${@}
}
xx_() {
[ $# -lt 1 ] || ${@} || fail "non-zero exit status: ${@}"
[ $# -lt 1 ] || ${@} || err_exit fail ${@}
}
err_exit()
{
_fail="${1}" && shift 1
echo "Non-zero exit: $@"
$_fail "Unhandled error"
}
check_git()