mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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:
+1
-2
@@ -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
@@ -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
@@ -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
@@ -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"; :
|
||||
|
||||
Reference in New Issue
Block a user