xbmk: simplify a few err calls

many of the messages are redundant, because errors caused
by the commands they handle would produce similar messages.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-05-27 11:57:13 +01:00
parent dbf0fda39a
commit aacd46bf81
4 changed files with 5 additions and 10 deletions
+1 -2
View File
@@ -106,8 +106,7 @@ try_file()
eval "[ -$echk \"$cached\" ] || return 1"
if [ "$2" = "git" ]; then
[ -d "$5" ] || tmpclone "$cached" "$5" "$6" "$7" || \
err "Can't clone final repo in command: try_file $*"; :
[ -d "$5" ] || tmpclone "$cached" "$5" "$6" "$7" || err; :
else
bad_checksum "$6" "$cached" && x_ rm -f "$cached" && return 1
[ "$cached" != "$5" ] && x_ cp "$cached" "$5"
+1 -2
View File
@@ -19,8 +19,7 @@ release()
done
reldest="$reldir/$version"
[ -e "$reldest" ] && \
err "already exists: \"$reldest\""
[ -e "$reldest" ] && err "already exists: \"$reldest\""
vdir="$XBMK_CACHE/relpwd/${xbtmp##*/}/$version"
rsrc="$vdir/${relname}_src"
+1 -2
View File
@@ -48,8 +48,7 @@ corebootpremake()
[ -n "$mode" ] || [ ! -f "$srcdir/.config" ] || $dry printf \
"CONFIG_CCACHE=y\n" >> "$srcdir/.config" || err "$srcdir: !cook"; :
fx_ check_coreboot_util printf "cbfstool\nifdtool\n"
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
err "!mk $srcdir .coreboot-version"
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || err
[ -z "$mode" ] && [ "$target" != "$tree" ] && \
x_ ./mk download "$target"; :
}
+2 -4
View File
@@ -45,8 +45,7 @@ trees()
[ -z "$_f" ] && err "missing flag ($flags)"
[ -z "$project" ] && fx_ "x_ ./mk $_f" x_ ls -1 config/git && return 1
[ -f "config/git/$project/pkg.cfg" ] || \
err "config/git/$project/pkg.cfg missing"
e "config/git/$project/pkg.cfg" f missing && err "$project: no pkg.cfg"
for d in "elf" "config/data" "config" "src"; do
eval "${d#*/}dir=\"$d/$project\""
@@ -187,8 +186,7 @@ check_project_hashes()
[ "$pjhash" != "$old_pjhash" ] && badhash="y"
[ -f "$XBMK_CACHE/hash/$project$tree" ] || badhash="y"
printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || \
err "!mk $XBMK_CACHE/hash/$project$tree"
printf "%s\n" "$pjhash" > "$XBMK_CACHE/hash/$project$tree" || err
[ "$badhash" != "y" ] || x_ rm -Rf "src/$project/$tree" \
"elf/$project/$tree" "elf/$project/$target"; :