diff --git a/openwrtbuilder b/openwrtbuilder index 617accb..03d35ae 100755 --- a/openwrtbuilder +++ b/openwrtbuilder @@ -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 }