소스 검색

Remove dupe curl

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

+ 8 - 7
openwrtbuilder

@@ -561,14 +561,15 @@ fromSource() {
     # Grab the release seed config
     if [[ -f "$SEED_FILE" ]]; then
         if askOk "$SEED_FILE exists. Re-download?"; then
-            if ! curl -so "$SEED_FILE" "$SEED_URL"; then
-                echo "Could not obtain seed config"
-            fi
-        else
-            echo "Reusing existing $SEED_FILE"
+            rm -f "$SEED_FILE"
+        fi
+    fi
+    if [[ -f "$SEED_FILE" ]]; then
+        echo "Reusing existing $SEED_FILE"
+    else
+        if ! curl -so "$SEED_FILE" "$SEED_URL"; then
+            echo "Could not obtain seed config"
         fi
-    elif ! curl -so "$SEED_FILE" "$SEED_URL"; then
-        echo "Could not obtain seed config"
     fi
 
     # Override default .config seed with profile packages