mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-13 14:59:34 +02:00
lib.sh: new function mk() to handle trees in bulk
single-tree projects cannot be handled in bulk, e.g. ./mk -f project1 project2 project3 that is still the case, from the shell, but internally it is now possible: mk -f project1 project2 project3 mk() is a function that simply handles the given flag, and all projects specified. it does not handle cases without argument, for example you cannot do: mk -f arguments must be provided. it can be used internally, to simplify cases where multiple single-tree projects must be handled, but *also* allows multi-tree projects to be specified, without being able to actually handle trees within that multi-tree project; so for example, you can only specify coreboot, and then it would run on every coreboot tree. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -212,3 +212,11 @@ cbfs()
|
||||
lzma="-c lzma" && [ $# -gt 3 ] && lzma="-t raw"
|
||||
x_ "$cbfstool" "$1" $ccmd -f "$2" -n "$3" $lzma
|
||||
}
|
||||
|
||||
mk()
|
||||
{
|
||||
mk_flag="$1" || $err "No argument given"
|
||||
shift 1 && for mk_arg in $@; do
|
||||
./mk $mk_flag $mk_arg || $err "./mk $mk_flag $mk_arg"; :
|
||||
done; :
|
||||
}
|
||||
|
||||
+1
-3
@@ -48,9 +48,7 @@ readkconfig()
|
||||
bootstrap()
|
||||
{
|
||||
x_ ./mk -f coreboot ${cbdir##*/}
|
||||
for d in uefitool biosutilities bios_extract; do
|
||||
x_ ./mk -b "$d"
|
||||
done
|
||||
mk -b uefitool biosutilities bios_extract
|
||||
[ -d "${kbc1126_ec_dump%/*}" ] && x_ make -C "$cbdir/util/kbc1126"
|
||||
[ -n "$MRC_refcode_cbtree" ] && \
|
||||
cbfstoolref="elf/cbfstool/$MRC_refcode_cbtree/cbfstool" && \
|
||||
|
||||
Reference in New Issue
Block a user