summaryrefslogtreecommitdiff
path: root/include/init.sh
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-29 15:48:49 +0100
committerLeah Rowe <leah@libreboot.org>2026-03-29 16:08:00 +0100
commite54862fcccca0325da8ae2879c1fa965267d3df0 (patch)
tree337f39085fc382cb56781dea4c329672d45e08a2 /include/init.sh
parent8657d084d2ae61a4cb06b5bc63223a92bfb5beb0 (diff)
lbmk: use mkhtemp in libreboot's build system
i added a fake -t option, which doesn't actually read optarg, so that -t usage can just override the normal template. mkhtemp isn't ready for distros yet, but it's ready for lbmk. i hacked the makefile to also copy the binary to mktemp, and i set PATH in lbmk so that this binary is used insttead of the one on your system. that way, upstream projects use it. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/init.sh')
-rw-r--r--include/init.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/init.sh b/include/init.sh
index cde489dd..d2ee4e32 100644
--- a/include/init.sh
+++ b/include/init.sh
@@ -17,6 +17,7 @@ if [ -z "${PATH+x}" ]; then
fi
sha512sum="util/sbase/sha512sum"
+mkhtemp="util/libreboot-utils/mkhtemp"
aur_notice=""
basetmp=""
@@ -231,7 +232,9 @@ xbmk_parent_check_tmp()
{
export TMPDIR="$basetmp"
- xbmklist="`mktemp || err "can't make tmplist"`" || \
+ bootstrap_mkhtemp
+
+ xbmklist="`"$mkhtemp" || err "can't make tmplist"`" || \
err "can't make tmplist" xbmk_parent_check_tmp "$@"
x_ rm -f "$xbmklist"
@@ -246,7 +249,7 @@ xbmk_parent_check_tmp()
done
# set up a unified temporary directory, for common deletion later:
- export TMPDIR="`x_ mktemp -d -t xbmk_XXXXXXXX`" || \
+ export TMPDIR="`x_ "$mkhtemp" -d -t xbmk_XXXXXXXX`" || \
err "can't export TMPDIR" "xbmk_parent_check_tmp" "$@"
xbtmp="$TMPDIR"
@@ -269,7 +272,7 @@ xbmk_parent_set_export()
"xbmk_parent_set_export" "$@"
fi
- export PATH="$xbtmp/xbmkpath:$xbtmp/gnupath:$PATH"
+ export PATH="$xbmkpwd/util/libreboot-utils:$xbtmp/xbmkpath:$xbtmp/gnupath:$PATH"
xbmkpath="$PATH"
# if "y": a coreboot target won't be built if target.cfg says release=n