mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-12 22:42:54 +02:00
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:
+3
-3
@@ -61,7 +61,7 @@ git_prep()
|
||||
[ "$XBMK_RELEASE" = "y" ] && rmgit "$tmpgit"
|
||||
|
||||
[ "$_loc" = "${_loc%/*}" ] || x_ mkdir -p "${_loc%/*}"
|
||||
mv "$tmpgit" "$_loc" || err "git_prep: !mv $tmpgit $_loc"
|
||||
x_ mv "$tmpgit" "$_loc"
|
||||
}
|
||||
|
||||
fetch_submodule()
|
||||
@@ -82,7 +82,7 @@ fetch_submodule()
|
||||
|
||||
[ "$st" = "file" ] && xbmkget "$subfile" "$subfile_bkup" \
|
||||
"$tmpgit/$1" "$subhash" && return 0
|
||||
rm -Rf "$tmpgit/$1" || err "!rm '$mdir' '$1'"
|
||||
x_ rm -Rf "$tmpgit/$1"
|
||||
tmpclone "$subrepo" "$subrepo_bkup" "$tmpgit/$1" "$subhash" \
|
||||
"$mdir/${1##*/}/patches"
|
||||
}
|
||||
@@ -101,6 +101,6 @@ nuke()
|
||||
{
|
||||
e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do
|
||||
rmf="src/${2%/}/$nukefile" && [ -L "$rmf" ] && continue
|
||||
e "$rmf" e missing || rm -Rf "$rmf" || err "!rm $rmf, ${2%/}"
|
||||
e "$rmf" e missing || x_ rm -Rf "$rmf"
|
||||
done < "config/${1%/}/nuke.list"; :
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user