diff options
| author | Leah Rowe <leah@libreboot.org> | 2025-05-26 13:19:06 +0100 | 
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2025-05-26 13:19:06 +0100 | 
| commit | 495098d6a71bc3a67a80d39a5d4fdf2d2207c782 (patch) | |
| tree | 3ece46742985bc095b0bd3c45b3930e3ca70703d /include/get.sh | |
| parent | 671e3aa27b402f04543cf016565421021d97c27d (diff) | |
get.sh: tidy up bad_checksum()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include/get.sh')
| -rw-r--r-- | include/get.sh | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/include/get.sh b/include/get.sh index d32452ff..6aed0a8d 100644 --- a/include/get.sh +++ b/include/get.sh @@ -151,10 +151,10 @@ try_git()  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" != "$1" ] && printf "BAD SHA512, '%s'; need '%s', got %s\n" \ -	    "$2" "$1" "$csum" 1>&2 && x_ rm -f "$2" && return 0; return 1 +	[ "$csum" = "$1" ] && return 1; x_ rm -f "$2" +	printf "BAD SHA512 %s, '%s'; need '%s'\n" "$csum" "$2" "$1" 1>&2  }  tmpclone() | 
