mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 23:08:49 +02:00
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>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
# helper script: clean the dependencies that were built in seabios
|
||||
#
|
||||
# Copyright (C) 2015, 2020, 2021 Leah Rowe <info@minifree.org>
|
||||
# Copyright (C) 2015,2020,2021,2023 Leah Rowe <info@minifree.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -26,13 +26,22 @@ set -u -e
|
||||
# clean bucts
|
||||
# --------------------------------------------------------
|
||||
|
||||
printf "Cleaning the previous builds of seabios\n"
|
||||
main()
|
||||
{
|
||||
[ ! -d "elf/seabios" ] || rm -Rf elf/seabios || \
|
||||
err "cannot remove elf/seabios"
|
||||
[ ! -d "seabios/" ] && exit 0
|
||||
|
||||
[ ! -d "elf/seabios" ] || rm -Rf elf/seabios || err "cannot remove elf/seabios"
|
||||
[ ! -d "seabios/" ] && exit 0
|
||||
clean_seabios
|
||||
}
|
||||
|
||||
for x in seabios/*; do
|
||||
[ "${x}" = "seabios/seabios" ] && continue
|
||||
[ ! -d "${x}" ] && continue
|
||||
make -C "${x}" distclean || err "cannot distclean tree, ${x}"
|
||||
done
|
||||
clean_seabios()
|
||||
{
|
||||
for x in seabios/*; do
|
||||
[ ! -d "${x}" ] && continue
|
||||
[ "${x}" = "seabios/seabios" ] && continue
|
||||
make -C "${x}" distclean || err "cannot distclean tree, ${x}"
|
||||
done
|
||||
}
|
||||
|
||||
main $@
|
||||
|
||||
Reference in New Issue
Block a user