lbmk: use x_ instead of err, where appropriate

many places in lbmk used err, because older versions
of x_ did not handle globbing properly.

however, use of x_ is preferable on trivial commands.

the only time err() should be called is what it has
to be, when x_ can't work, or when a more useful error
message is needed, for context.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-09 20:54:23 +01:00
parent 14d46abced
commit 81dbde7e09
7 changed files with 34 additions and 35 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ xbmkpkg()
eval "`setcfg "config/dependencies/$2"`"
chkvars pkg_add pkglist
$pkg_add $pkglist || err "Cannot install packages"
x_ $pkg_add $pkglist
[ -n "$aur_notice" ] && \
printf "You need AUR packages: %s\n" "$aur_notice" 1>&2; :
@@ -200,7 +200,7 @@ xbmk_create_pathdirs()
(
# set up python v3.x in PATH, in case it's not set up correctly.
# see code above that detected the correct python3 command.
cd "$XBMK_CACHE/xbmkpath" || err "can't cd $XBMK_CACHE/xbmkpath"
x_ cd "$XBMK_CACHE/xbmkpath"
x_ ln -s "`pybin "$python"`" python
) || err "Can't set up python symlink in $XBMK_CACHE/xbmkpath"; :
}