Explorar o código

Cleanup checksum path

bryan %!s(int64=2) %!d(string=hai) anos
pai
achega
7e8cbb01fd
Modificáronse 1 ficheiros con 6 adicións e 4 borrados
  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
 }