mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-16 12:31:25 +02:00
get.sh: tidy up bad_checksum()
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-3
@@ -151,10 +151,10 @@ try_git()
|
|||||||
|
|
||||||
bad_checksum()
|
bad_checksum()
|
||||||
{
|
{
|
||||||
[ ! -f "$2" ] && printf "'%s' missing, %s\n" "$2" "$1" 1>&2 && return 0
|
e "$2" f missing && return 0
|
||||||
csum="$(x_ sha512sum "$2" | awk '{print $1}')" || err "!sha512 '$2' $1"
|
csum="$(x_ sha512sum "$2" | awk '{print $1}')" || err "!sha512 '$2' $1"
|
||||||
[ "$csum" != "$1" ] && printf "BAD SHA512, '%s'; need '%s', got %s\n" \
|
[ "$csum" = "$1" ] && return 1; x_ rm -f "$2"
|
||||||
"$2" "$1" "$csum" 1>&2 && x_ rm -f "$2" && return 0; return 1
|
printf "BAD SHA512 %s, '%s'; need '%s'\n" "$csum" "$2" "$1" 1>&2
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpclone()
|
tmpclone()
|
||||||
|
|||||||
Reference in New Issue
Block a user