mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-14 15:29:35 +02:00
unified list command for all scripts
e.g. ./build boot roms list ./update blobs inject listboards ./build boot list ./build clean list also this is now possible: ./build list or maybe ./update list ^ would list directories in resources/scripts/build and resources/scripts/update respectively this script is added: resources/scripts/build/command/options call it like so, e.g. ./build command options resources/coreboot this script is now used, for list functions in other scripts. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -76,17 +76,13 @@ main()
|
||||
[ -f "${listfile}" ] || fail "list file, ${listfile}, does not exist"
|
||||
|
||||
# Build for all targets if no argument is given
|
||||
if [ "$#" -eq 0 ]; then
|
||||
for target_dir in "${cfgsdir}"/*; do
|
||||
[ -d "${target_dir}/config/" ] || continue
|
||||
set -- "$@" "${target_dir#${cfgsdir}/}"
|
||||
done
|
||||
fi
|
||||
targets=$(./build command options "${cfgsdir}")
|
||||
[ $# -gt 0 ] && targets=$@
|
||||
|
||||
[ -d "${elfdir}" ] || [ "${mode}" != "all" ] || \
|
||||
mkdir -p "${elfdir}/" || fail "can't create directory ${elfdir}"
|
||||
|
||||
for x in "$@"; do
|
||||
for x in ${targets}; do
|
||||
target="${x}"
|
||||
printf "Running 'make %s' for project '%s, target '%s''\n" \
|
||||
"${mode}" "${project}" "${target}"
|
||||
|
||||
Reference in New Issue
Block a user