Always configure craft if first download and set to not reconfigure by default in...
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Sat, 22 Jun 2024 08:41:22 +0000 (16:41 +0800)
committerClaudio Cambra <developer@claudiocambra.com>
Mon, 8 Jul 2024 07:41:45 +0000 (15:41 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
admin/osx/mac-crafter/Sources/main.swift

index 00b5a8950c4198acb9915a1887ffa3ce5e9ceeb4..c2d5b738cd37f9be46f30cb7db49277cd017720c 100644 (file)
@@ -49,8 +49,8 @@ struct MacCrafter: ParsableCommand {
     @Option(name: [.long], help: "Build type (e.g. Release, RelWithDebInfo, MinSizeRel, Debug).")
     var buildType = "RelWithDebInfo"
 
-    @Option(name: [.long], help: "Skip craft configuration.")
-    var skipCraftConfiguration = false
+    @Option(name: [.long], help: "Reconfigure craft.")
+    var reconfigureCraft = false
 
     @Option(name: [.long], help: "The application's branded name.")
     var appName = "Nextcloud"
@@ -90,7 +90,7 @@ struct MacCrafter: ParsableCommand {
         let craftCommand =
             "python3 \(craftMasterPy) --config \(craftMasterIni) --target \(craftTarget) -c"
 
-        if !skipCraftConfiguration {
+        if !fm.fileExists(atPath: craftMasterDir) || reconfigureCraft {
             print("Configuring KDE Craft.")
 
             if fm.fileExists(atPath: craftMasterDir) {