mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-09-20 21:50:21 +02:00
04c3bc53b6
not needed at the moment, since we ensure that the functions always exit with error under fault condition. they always return zero. nevertheless, this might catch some unexpected behaviour in the future. Signed-off-by: Leah Rowe <leah@libreboot.org>
39 lines
632 B
Bash
Executable File
39 lines
632 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Copyright (c) 2020-2026 Leah Rowe <leah@libreboot.org>
|
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
|
|
|
set -u -e
|
|
|
|
(
|
|
xbarg0="$0"
|
|
[ "${xbarg0##*/}" = "$xbarg0" ] && \
|
|
xbarg0="`command -v "$xbarg0"`"
|
|
|
|
commandv="`readlink -f "$xbarg0" 2>/dev/null`"
|
|
[ -z "$commandv" ] && \
|
|
commandv="`realpath "$xbarg0" 2>/dev/null`"
|
|
|
|
cd "${commandv%/*}" || exit 1
|
|
|
|
. "include/common.sh"
|
|
|
|
if xeq main "${1-}" \
|
|
$xbcommands; then
|
|
|
|
"$@" || exit 1
|
|
exit 0
|
|
fi
|
|
|
|
. "include/tree.sh"
|
|
|
|
trees "$@" || exit 0
|
|
|
|
x_ touch "$mkhelpercfg"
|
|
|
|
. "$mkhelpercfg"
|
|
$cmd
|
|
) || exit 1; :
|