variable ./mk location, based on user input

when calling ./mk, or from PATH, an absolute path
is created to ./mk

this will likely be different than mk, but it might
be a different script. perhaps the operator is making
a copy of the mk script temporarily - obviously not
advised, no, but here we have a problem because then
lbmk is still running ./mk everywhere

run arg0 instead, now called "mk"

./mk is still hardcoded in release.sh, because we
do need to make sure we're using the right script
there

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-09-16 05:52:06 +01:00
parent 88887c0163
commit 113dac006f
6 changed files with 29 additions and 30 deletions
+2 -2
View File
@@ -32,11 +32,11 @@ single_tree_fetch()
fi
[ -n "$xgcctree" ] && \
x_ ./mk -f coreboot "$xgcctree"
x_ "$mk" -f coreboot "$xgcctree"
[ -n "$depend" ] && \
for d in $depend ; do
x_ ./mk -f $d
x_ "$mk" -f $d
done
clone_project
+2 -2
View File
@@ -348,7 +348,7 @@ xbmk_set_mirror()
git_init()
{
# the git identity check is only needed for: ./mk -b coreboot [args]
# the git identity check is only needed for: "$mk" -b coreboot [args]
[ "${2-}" = "-b" ] && [ "${3-}" = "coreboot" ] && \
for gitarg in "user.name" "user.email"; do
git config --includes $gitarg 1>/dev/null 2>/dev/null || \
@@ -381,7 +381,7 @@ xchild()
{
xbmk_rval=0
( x_ ./mk "$@" ) || xbmk_rval=1
( x_ "$mk" "$@" ) || xbmk_rval=1
( x_ rm -Rf "$xbtmp" ) || xbmk_rval=1
( x_ rm -f "$xbmklock" ) || xbmk_rval=1
+2 -2
View File
@@ -106,7 +106,7 @@ check_target()
[ -z "$tree" ] && \
err "tree unset in '$boarddir/target.cfg'" "check_target" "$@"
x_ ./mk -d coreboot "$tree"
x_ "$mk" -d coreboot "$tree"
ifdtool="elf/coreboot/$tree/ifdtool"
@@ -117,7 +117,7 @@ check_target()
patch_release()
{
[ "$nuke" != "nuke" ] && \
x_ ./mk download "$board"
x_ "$mk" download "$board"
has_hashes="n"
tmpromdir="$tmpromdel/bin/$board"
+2 -2
View File
@@ -74,7 +74,7 @@ corebootpremake()
err "!mk $srcdir .coreboot-version" "corebootpremake" "$@"
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
x_ ./mk download "$target"; :
x_ "$mk" download "$target"; :
}
cook_coreboot_config()
@@ -455,5 +455,5 @@ mkcoreboottar()
fi
mkrom_tarball "bin/$target"
x_ ./mk inject "bin/${relname}_${target}.tar.xz" nuke
x_ "$mk" inject "bin/${relname}_${target}.tar.xz" nuke
}
+8 -8
View File
@@ -222,7 +222,7 @@ extract_intel_me()
"extract_intel_me" "$@"
fi
x_ ./mk -f deguard
x_ "$mk" -f deguard
fi
set +u +e
@@ -455,20 +455,20 @@ bootstrap()
[ "$XBMKmecleaner" = "y" ] && \
mecleaner="$xbmkpwd/src/me_cleaner/me_cleaner.py"
x_ ./mk -f coreboot "${cbdir##*/}"
x_ ./mk -f me_cleaner
x_ "$mk" -f coreboot "${cbdir##*/}"
x_ "$mk" -f me_cleaner
x_ ./mk -b bios_extract
x_ ./mk -b biosutilities
x_ ./mk -b uefitool
x_ ./mk -b libarchive # for bsdtar and bsdunzip
x_ "$mk" -b bios_extract
x_ "$mk" -b biosutilities
x_ "$mk" -b uefitool
x_ "$mk" -b libarchive # for bsdtar and bsdunzip
[ -d "${kbc1126_ec_dump%/*}" ] && \
x_ make -C "$cbdir/util/kbc1126"
if [ -n "$MRC_refcode_cbtree" ]; then
cbfstoolref="elf/coreboot/$MRC_refcode_cbtree/cbfstool"
x_ ./mk -d coreboot "$MRC_refcode_cbtree"; :
x_ "$mk" -d coreboot "$MRC_refcode_cbtree"; :
fi
}