summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbuild12
-rw-r--r--include/lib.sh8
-rw-r--r--include/vendor.sh4
-rwxr-xr-xscript/trees4
4 files changed, 14 insertions, 14 deletions
diff --git a/build b/build
index ffed6708..ce744339 100755
--- a/build
+++ b/build
@@ -36,11 +36,9 @@ main()
inject) shift 1; vendor_inject $@ ;;
download) shift 1; vendor_download $@ ;;
roms)
- if [ $# -gt 1 ] && [ "$2" = "serprog" ]; then
- x_ ./mk -b stm32-vserprog
- x_ ./mk -b pico-serprog; return 0
- fi; shift 1
- x_ ./mk -b coreboot $@ ;;
+ [ $# -gt 1 ] && [ "$2" = "serprog" ] && \
+ mk -b stm32-vserprog pico-serprog && return 0
+ shift 1; x_ ./mk -b coreboot $@ ;;
*)
[ -f "$spath" ] || $err "bad command"
$shcmd; "$spath" $@ || $err "excmd: $spath $(echo "$@")" ;;
@@ -110,9 +108,7 @@ build_release()
touch "$srcdir/lock" || $err "can't make lock file in $srcdir/"
(
cd "$srcdir" || $err "$vdir: 2 !cd \"$srcdir\""
- ./mk -b coreboot || $err "$vdir: roms-all"
- ./mk -b pico-serprog || $err "$vdir: rp2040"
- ./mk -b stm32-vserprog || $err "$vdir: stm32"
+ mk -b coreboot pico-serprog stm32-vserprog
x_ mv bin ../roms
) || $err "can't build rom images"
diff --git a/include/lib.sh b/include/lib.sh
index 586ecde1..2c9cd0d4 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -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; :
+}
diff --git a/include/vendor.sh b/include/vendor.sh
index a6e82271..ea1d4f0a 100644
--- a/include/vendor.sh
+++ b/include/vendor.sh
@@ -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" && \
diff --git a/script/trees b/script/trees
index 227b2216..01df28a0 100755
--- a/script/trees
+++ b/script/trees
@@ -36,9 +36,7 @@ main()
project="${OPTARG#src/}"; shift 2
done
[ -z "$_f" ] && $err "missing flag (-m/-u/-b/-c/-x/-f/-s/-l/-n)"
- [ -z "$project" ] && for p in $(ls -1 config/git); do
- ./mk $_f "$p" || $err "!./mk $_f $p"; :
- done && return 1
+ [ -z "$project" ] && mk $_f $(ls -1 config/git) && return 1
[ -f "config/git/$project/pkg.cfg" ] || $err "'$project' not defined"