summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-09-16 11:37:20 +0100
committerLeah Rowe <leah@libreboot.org>2023-09-16 11:37:20 +0100
commitf8704c0a0de9c7cf43ab1743bbaf2d46411623df (patch)
treeee2b757a1356a491123a504cbdfbe9b1ab93856c
parenta1db59a5834cff370a94f922ccbec897e4946cba (diff)
lbmk: more verbose error messages
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xlbmk10
1 files changed, 6 insertions, 4 deletions
diff --git a/lbmk b/lbmk
index e0b8fccc..75aaab5f 100755
--- a/lbmk
+++ b/lbmk
@@ -75,7 +75,7 @@ install_packages()
printf "Look at files under config/dependencies/\n" \
1>&2
printf "Example: ./build dependencies debian\n" 1>&2
- fail "target not specified"
+ fail "install_packages: target not specified"
fi
[ -f "config/dependencies/${2}" ] || fail "Unsupported target"
@@ -100,7 +100,8 @@ execute_command()
fi
[ -f "${buildpath}/${mode}/${option}" ] || \
fail "Invalid command. Run: ${linkpath} help"
- "${buildpath}/${mode}/${option}" $@ || fail "lbmk error"
+ "${buildpath}/${mode}/${option}" $@ || \
+ fail "execute_command: ${buildpath}/${mode}/${option} ${@}"
}
usage()
@@ -124,13 +125,14 @@ usage()
lbmk_exit()
{
- tmp_cleanup || err "could not remove tmpdir on lbmk exit: ${tmpdir}"
+ tmp_cleanup || \
+ err "lbmk_exit: could not remove tmpdir upon exit $1: ${tmpdir}"
exit $1
}
fail()
{
- tmp_cleanup || printf "WARNING: could not remove tmpdir: %s\n" \
+ tmp_cleanup || printf "fail(): WARNING: cannot remove tmpdir: %s\n" \
"${tmpdir}" 1>&2
err "${1}"
}