init.sh: Provide more complete error info

On initialisation of the child instance, ./mk is
executed, but an error from it won't reveal what
command was actually executed.

This change makes that the case, since x_ does
print the command that caused an error.

This is useful for debugging. However, we don't
want x_ to cause a real exit, because we still
need to handle the lock file from the parent
instance.

Therefore, the first child instance is executed
inside a subshell, and xbmk_rval is set if that
subshell returns non-zero.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-04-26 21:17:23 +01:00
parent a8f0623efb
commit a0e1d42ff7
+1 -1
View File
@@ -205,7 +205,7 @@ xbmk_child_init()
) || $err "Can't set up python symlink in $XBMK_CACHE/xbmkpath"
xbmk_rval=0
./mk "$@" || xbmk_rval=1
( x_ ./mk "$@" ) || xbmk_rval=1
rm -Rf "$xbmktmp" || xbmk_rval=1
rm -f lock || xbmk_rval=1
exit $xbmk_rval