Cleanup checksum path

This commit is contained in:
2023-01-14 11:21:11 -05:00
부모 d2eb875a97
커밋 7e8cbb01fd

파일 보기

@@ -380,16 +380,18 @@ verifyImage() {
if hash sha256sum &>/dev/null; then
debug "Verifying Image Builder checksums"
if [[ -f $SHA256_FILE ]] && askOk "$SHA256_FILE exists. Re-download?"; then
if ! curl -so "$SHA256_FILE" "$SHA256_URL"; then
debug "Failed to download checksum"
if [[ -f $SHA256_FILE ]]; then
if askOk "$SHA256_FILE exists. Re-download?"; then
if ! curl -so "$SHA256_FILE" "$SHA256_URL"; then
debug "Failed to download checksum"
fi
fi
elif ! curl -so "$SHA256_FILE" "$SHA256_URL"; then
debug "Failed to download checksum"
fi
checksum=$(grep "${IB_ARCHIVE##*/}" "$SHA256_FILE" | cut -f1 -d' ')
debug "$IB_ARCHIVE checksum: $checksum"
debug "$IB_ARCHIVE $checksum"
echo -n "$checksum $IB_ARCHIVE" | sha256sum --check --status
fi
}