diff options
author | Leah Rowe <leah@libreboot.org> | 2023-10-19 23:36:56 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2023-10-19 23:36:56 +0100 |
commit | 0b98c9b00c6b99940555cff25f7c6858745a560c (patch) | |
tree | e79ed28e199df51146d6d850c224ee6b2e518638 /script/update/project | |
parent | 8b6e44a104680412967acd6ac760945f8233abf2 (diff) |
minor code cleanup in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/project')
-rwxr-xr-x | script/update/project/trees | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/script/update/project/trees b/script/update/project/trees index c8643966..7ba9a38b 100755 --- a/script/update/project/trees +++ b/script/update/project/trees @@ -87,7 +87,7 @@ build_targets() [ $# -gt 0 ] && target1="${1}" [ "${target1}" = "utils" ] && [ "${project}" = "coreboot" ] && \ shift 1 - targets=$(listitems "${cfgsdir}") || \ + targets=$(items "${cfgsdir}") || \ err "Cannot get options for ${cfgsdir}" [ $# -gt 0 ] && targets=$@ @@ -173,15 +173,14 @@ handle_src_tree() fi [ "${target1}" = "utils" ] && [ "${project}" = "coreboot" ] && return 0 + [ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && return 0 # u-boot and coreboot are both compiled with coreboot's crossgcc - if [ "${project}" = "coreboot" ] || [ "${project}" = "u-boot" ]; then - [ ! -z ${mode} ] || check_cross_compiler || \ - err "handle_src_tree ${project}/${target}: crossgcc" - cbfstool="cbutils/${tree}/cbfstool" - [ -f "${cbfstool}" ] || \ - x_ ./update project trees -b coreboot utils "${tree}" - fi + [ ! -z ${mode} ] || check_cross_compiler || \ + err "handle_src_tree ${project}/${target}: crossgcc" + cbfstool="cbutils/${tree}/cbfstool" + [ -f "${cbfstool}" ] && return 0 + x_ ./update project trees -b coreboot utils "${tree}" } # set up cross-compiler (coreboot crossgcc) for u-boot and coreboot @@ -279,6 +278,7 @@ run_make_command() x_ printf "%s\n" "${version%%-*}" >"${codedir}/.coreboot-version" x_ make ${mode} -j$(nproc) -C "${codedir}" + [ "${mode}" != "clean" ] && return 0 make -C "${codedir}" distclean 2>/dev/null || : } |