소스 검색

Cleanup checksum path

bryan 2 년 전
부모
커밋
7e8cbb01fd
1개의 변경된 파일6개의 추가작업 그리고 4개의 파일을 삭제
  1. 6 4
      openwrtbuilder

+ 6 - 4
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
 }