diff options
author | Leah Rowe <leah@libreboot.org> | 2023-12-27 17:26:37 +0000 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-12-27 17:26:37 +0000 |
commit | bc87b5f67e49c8e51e58a68e0651fd6ed176bb7d (patch) | |
tree | a99535cb2dd62746d263e17d5f25aeebb42f0224 /script | |
parent | 0c1d08d8b1c5757ca10487fb3256741718009ac1 (diff) |
lbmk scripts: general code cleanup
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-x | script/update/trees | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/script/update/trees b/script/update/trees index 4c969df7..da42d200 100755 --- a/script/update/trees +++ b/script/update/trees @@ -44,11 +44,7 @@ main() build_projects() { [ $# -gt 0 ] && x_ ./update trees $_f $@ - - if [ "${mode}" = "fetch" ]; then - fetch_project_repo - return 0 - fi + [ "$mode" = "fetch" ] && eval "fetch_project_repo; return 0;" codedir="src/${project}" [ -d "$codedir" ] || x_ ./update trees -f "$project" @@ -86,7 +82,6 @@ build_targets() [ $# -gt 0 ] && targets=$@ [ -z "$mode" ] && x_ mkdir -p "$elfdir" - handle_targets } @@ -111,10 +106,8 @@ handle_defconfig() { handle_src_tree "$target" || return 0 - if [ "$target1" = "utils" ] && [ "$project" = "coreboot" ]; then - handle_coreboot_utils "$tree" - return 0 - fi + [ "$target1" = "utils" ] && [ "$project" = "coreboot" ] && \ + eval "handle_coreboot_utils \"$tree\"; return 0" for y in "${target_dir}/config"/*; do [ -f "$y" ] || continue @@ -133,11 +126,7 @@ handle_defconfig() handle_src_tree() { target_dir="${cfgsdir}/${target}" - - if [ "$mode" = "fetch" ]; then - fetch_project_trees - return 1 - fi + [ "$mode" = "fetch" ] && eval "fetch_project_trees; return 1;" x_ mkdir -p "${elfdir}/${target}" eval "$(setvars "" xarch xlang tree)" @@ -236,7 +225,6 @@ copy_elf() [ ! -f "${codedir}/$f" ] || \ x_ cp "${codedir}/${f}" "$dest_dir" done < "$listfile" - x_ make clean -C "$codedir" } |