summaryrefslogtreecommitdiff
path: root/resources/scripts/build/clean
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-08-21 19:41:49 +0100
committerLeah Rowe <leah@libreboot.org>2023-08-21 22:38:00 +0100
commit62f23123cb2a5ef594f405053d0b111c6e01de87 (patch)
tree74d57d43b7e3cf107c183d273d10dcd5278ab138 /resources/scripts/build/clean
parent7be4706552845824888b58054120dfac99bfdf63 (diff)
general code cleanup on lbmk shell scripts
in update/blobs/download, i saw instances where appdir was being deleted with rm -r, but the more appropriate command would rm -Rf. this is now fixed. other than that, i've mostly just simplified a bunch of if statements and consolidated some duplicated logic (e.g. if/else block for dependencies in build_dependencies() of update/blobs/download one or two functions and/or variables have been renamed, for greater clarity in the code, also removed a few messages that were redundant used printf instead of echo, in a few places, also fixed up the indentation in a few places Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'resources/scripts/build/clean')
-rwxr-xr-xresources/scripts/build/clean/cbutils9
-rwxr-xr-xresources/scripts/build/clean/crossgcc7
2 files changed, 5 insertions, 11 deletions
diff --git a/resources/scripts/build/clean/cbutils b/resources/scripts/build/clean/cbutils
index de9a588f..dec8d944 100755
--- a/resources/scripts/build/clean/cbutils
+++ b/resources/scripts/build/clean/cbutils
@@ -33,12 +33,9 @@ rm -Rf cbutils
[ ! -d "coreboot/" ] && exit 0
for tree in coreboot/*; do
- if [ "${tree##*/}" = "coreboot" ]; then
- continue
- fi
- if [ ! -d "${tree}" ]; then
- continue
- fi
+ [ "${tree##*/}" = "coreboot" ] && continue
+ [ -d "${tree}" ] || continue
+
# Clean coreboot, of course
make -C "${tree}/" distclean
diff --git a/resources/scripts/build/clean/crossgcc b/resources/scripts/build/clean/crossgcc
index 6c09c878..8c61dd5f 100755
--- a/resources/scripts/build/clean/crossgcc
+++ b/resources/scripts/build/clean/crossgcc
@@ -25,14 +25,11 @@ set -u -e
main()
{
printf "Cleaning crossgcc builds in all coreboot archives\n"
-
[ ! -d "coreboot/" ] && exit 0
for board in coreboot/*; do
- [ "${board##*/}" = "coreboot" ] && \
- continue
- [ ! -d "${board}" ] && \
- continue
+ [ "${board##*/}" = "coreboot" ] && continue
+ [ ! -d "${board}" ] && continue
make -C "${board}/" crossgcc-clean || err "make-clean"
done
}