From 0b98c9b00c6b99940555cff25f7c6858745a560c Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 19 Oct 2023 23:36:56 +0100 Subject: minor code cleanup in shell scripts Signed-off-by: Leah Rowe --- build | 13 +++---------- include/git.sh | 3 +-- include/mrc.sh | 26 +++++++++++--------------- include/option.sh | 4 ++-- script/build/fw/coreboot | 26 ++++++++++---------------- script/update/project/trees | 16 ++++++++-------- script/update/vendor/download | 8 +++----- script/update/vendor/inject | 2 +- 8 files changed, 39 insertions(+), 59 deletions(-) diff --git a/build b/build index a539322f..09b08403 100755 --- a/build +++ b/build @@ -59,7 +59,7 @@ initialise_command() [ "${mode}" = "help" ] && usage ${0} && lbmk_exit 0 if [ "${mode}" = "list" ]; then - listitems "${buildpath}" + items "${buildpath}" lbmk_exit 0 elif [ $# -lt 2 ]; then usage ${0} @@ -91,15 +91,8 @@ install_packages() execute_command() { - if [ "${option}" = "list" ]; then - xx_ listitems "${buildpath}/${mode}" - lbmk_exit 0 - fi + [ "$option" = "list" ] && xx_ items "$buildpath/$mode" && lbmk_exit 0 lbmkcmd="${buildpath}/${mode}/${option}" - [ "${lbmkcmd}" = "./script/build/boot/roms" ] && \ - printf "NOTE: ./build boot roms now: ./build fw coreboot\n" 1>&2 - [ "${lbmkcmd%/*}" = "./script/update/blobs" ] && \ - printf "NOTE: ./update blobs is now: ./update vendor\n" 1>&2 [ -f "${lbmkcmd}" ] || fail "Invalid command. Run: ${linkpath} help" "${lbmkcmd}" $@ || fail "execute_command: ${lbmkcmd} ${@}" } @@ -111,7 +104,7 @@ usage() USAGE: ${progname}