summaryrefslogtreecommitdiff
path: root/include/tree.sh
AgeCommit message (Collapse)Author
2025-05-19tree.sh: fix up copy_elf(), bad for loopLeah Rowe
Because of how sh works, having just the [] line causes sh to exit, annoyingly without an error message, but it does cause a non-zero exit. This bug will have already been triggering, before I added the recent error handling on files for this for loop. also do it to the other loop in lib.sh Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-19xbmk: stricter handling of files on while loopsLeah Rowe
i overlooked these! Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-15properly exit 1 when calling fx_Leah Rowe
in a few places, we use the presence of a file found by fx_ to cause an exit, but the command that runs looks something like: exit 1 "string" this yields an error, and a non-zero exit, because of too many arguments to "exit", but we wanted a non-zero exit anyway. nevertheless, this is incorrect. to fix it, eval is used instead. if the never-going-to-exist condition one day exists where exit 1 actually returns, not, you know, exits, we will use err instead, with the string as argument. this should be fine. it's a bit hacky, but so is fx_, and it works. fx_ is used in several places to keep the sloccount down, providing a common way to perform while loops on the output of a command; that is its only purpose.. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-12lib.sh: remove mk()Leah Rowe
i don't need it. i can use fx_ instead, on functions that previously called mk(). Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-10tree.sh: only create elfdir in copy_elf()Leah Rowe
otherwise, we create empty directories where build.list doesn't exist, like on coreboot. we already create a directory when needed, when actually copying elf files, so let's just leave it at that. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-10tree.sh: simplified srcdir check on make-cleanLeah Rowe
this is the check that ksips a given target if the tree directory does not exist, on the clean command. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-09lbmk: use x_ instead of err, where appropriateLeah Rowe
many places in lbmk used err, because older versions of x_ did not handle globbing properly. however, use of x_ is preferable on trivial commands. the only time err() should be called is what it has to be, when x_ can't work, or when a more useful error message is needed, for context. Signed-off-by: Leah Rowe <leah@libreboot.org>
2025-05-08mk: re-split tree logic to include/tree.shLeah Rowe
I really think mk should just be a small stub. Better to keep everything separate. Signed-off-by: Leah Rowe <leah@libreboot.org>