summaryrefslogtreecommitdiff
path: root/resources/scripts/build/clean/crossgcc
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-24 00:30:07 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-24 00:31:19 +0100
commit8f4f0e00ec3c307599f7f27777e3e92c1f9f6e4e (patch)
tree39ec749c16892b69cda00b6241714f475a1989b6 /resources/scripts/build/clean/crossgcc
parent4c6c7d1088eb9dc0c9b2eeeb64febeeb78038583 (diff)
use the new coding style in scripts
there were stragglers left over from the last audit, and these stragglers still exist even after all the major re-factoring as of late the new style is: bsd-like coding style and error handling. verbose yet simple error handling. we use an "err" function in a way reminiscent of most C programs that you see in openbsd base (err.h) this style is very clean, resulting in readable code Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts/build/clean/crossgcc')
-rwxr-xr-xresources/scripts/build/clean/crossgcc7
1 files changed, 6 insertions, 1 deletions
diff --git a/resources/scripts/build/clean/crossgcc b/resources/scripts/build/clean/crossgcc
index 76de1e19..7b1765f8 100755
--- a/resources/scripts/build/clean/crossgcc
+++ b/resources/scripts/build/clean/crossgcc
@@ -29,9 +29,14 @@ main()
printf "Cleaning crossgcc builds in all coreboot archives\n"
[ ! -d "coreboot/" ] && exit 0
+ clean_crossgcc
+}
+
+clean_crossgcc()
+{
for board in coreboot/*; do
+ [ -d "${board}" ] || continue
[ "${board##*/}" = "coreboot" ] && continue
- [ ! -d "${board}" ] && continue
make -C "${board}/" crossgcc-clean || err "make-clean"
done
}