summaryrefslogtreecommitdiff
path: root/resources/scripts/build/release/src
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/release/src
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/release/src')
-rwxr-xr-xresources/scripts/build/release/src21
1 files changed, 8 insertions, 13 deletions
diff --git a/resources/scripts/build/release/src b/resources/scripts/build/release/src
index 9e5e51d7..ba09a3d3 100755
--- a/resources/scripts/build/release/src
+++ b/resources/scripts/build/release/src
@@ -77,12 +77,10 @@ create_release_directory()
download_modules()
{
for modname in ${trees_fetch_list}; do
- [ ! -d "${modname}" ] && \
- ./fetch_trees ${modname}
+ [ ! -d "${modname}" ] && ./fetch_trees ${modname}
done
for modname in ${simple_fetch_list}; do
- [ ! -d "${modname}/" ] && \
- ./fetch ${modname}
+ [ ! -d "${modname}/" ] && ./fetch ${modname}
done
}
@@ -110,12 +108,10 @@ copy_blobs()
for i in t440p xx20 xx30 hp8200sff hp_ivybridge hp_sandybridge \
hp8300usdt t1650; do
for j in ifd gbe 4_ifd 8_ifd 12_ifd 16_ifd; do
- if [ -f "blobs/${i}/${j}.bin" ]; then
- if [ ! -e "${srcdir}/blobs/${i}" ]; then
- mkdir -p "${srcdir}/blobs/${i}"
- fi
- cp blobs/${i}/${j}.bin "${srcdir}/blobs/${i}"
- fi
+ [ -f "blobs/${i}/${j}.bin" ] || continue
+ [ -e "${srcdir}/blobs/${i}" ] || \
+ mkdir -p "${srcdir}/blobs/${i}"
+ cp blobs/${i}/${j}.bin "${srcdir}/blobs/${i}"
done
done
}
@@ -125,8 +121,7 @@ purge_files()
(
cd "${srcdir}/coreboot/" || err "cd1"
for i in *; do
- [ ! -d "${i}" ] && \
- continue
+ [ ! -d "${i}" ] && continue
(
cd "${i}/" || err "cd2"
make distclean || err "make-distclean1"
@@ -148,7 +143,7 @@ purge_files()
rm -Rf coreboot/coreboot/ || err "rm-rf1"
rm -Rf .git .gitignore */.git* coreboot/*/.git* \
- coreboot/*/3rdparty/*/.git* || err "rm-rf2"
+ coreboot/*/3rdparty/*/.git* || err "rm-rf2"
rm -Rf coreboot/*/util/nvidia/cbootimage/.git* || err "rm-rf3"
rm -Rf u-boot/u-boot/ u-boot/*/.git* || err "rm-rf4"
)