mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 06:49:52 +02:00
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>
This commit is contained in:
@@ -39,10 +39,8 @@ main()
|
||||
|
||||
build_for_mainboard() {
|
||||
board="${1}"
|
||||
[ ! -d "resources/coreboot/${board}" ] && \
|
||||
continue
|
||||
[ ! -f "resources/coreboot/${board}/target.cfg" ] && \
|
||||
continue
|
||||
[ -d "resources/coreboot/${board}" ] || continue
|
||||
[ -f "resources/coreboot/${board}/target.cfg" ] || continue
|
||||
tree="undefined"
|
||||
. "resources/coreboot/${board}/target.cfg" # source
|
||||
if [ "${tree}" = "undefined" ]; then
|
||||
@@ -55,15 +53,12 @@ build_for_mainboard() {
|
||||
|
||||
buildutils() {
|
||||
tree="${1}"
|
||||
if [ ! -d "coreboot/${tree}/" ]; then
|
||||
[ -d "coreboot/${tree}/" ] || \
|
||||
./fetch_trees coreboot $tree || return 1
|
||||
fi
|
||||
for util in cbfstool ifdtool; do
|
||||
[ -f "cbutils/${tree}/${util}" ] \
|
||||
&& continue
|
||||
if [ ! -d "cbutils/${tree}" ]; then
|
||||
[ -f "cbutils/${tree}/${util}" ] && continue
|
||||
[ -d "cbutils/${tree}" ] || \
|
||||
mkdir -p "cbutils/${tree}" || return 1
|
||||
fi
|
||||
|
||||
utildir="coreboot/${tree}/util/${util}"
|
||||
make distclean -C "${utildir}" || return 1
|
||||
|
||||
Reference in New Issue
Block a user