From 3ef5ba31f648cd0f1b90ea8b0eab416731a95edf Mon Sep 17 00:00:00 2001 From: Ne_Eo Date: Sun, 22 Sep 2024 15:14:35 +0200 Subject: [PATCH] Small change --- commandline/Main.hx | 2 +- commandline/commands/{Update.hx => Setup.hx} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename commandline/commands/{Update.hx => Setup.hx} (97%) diff --git a/commandline/Main.hx b/commandline/Main.hx index 8c2f9301..1b5b01b8 100644 --- a/commandline/Main.hx +++ b/commandline/Main.hx @@ -12,7 +12,7 @@ class Main { { names: ["setup"], doc: "Setups (or updates) all libraries required for the engine.", - func: Update.main, + func: Setup.main, dDoc: [ "Usage: setup", "", diff --git a/commandline/commands/Update.hx b/commandline/commands/Setup.hx similarity index 97% rename from commandline/commands/Update.hx rename to commandline/commands/Setup.hx index 0d39d27c..4e97e989 100644 --- a/commandline/commands/Update.hx +++ b/commandline/commands/Setup.hx @@ -6,7 +6,7 @@ import sys.io.File; import sys.io.Process; import sys.FileSystem; -class Update { +class Setup { private static function recursiveDelete(path:String) { for(file in FileSystem.readDirectory(path)) { var p = '$path/$file'; @@ -54,10 +54,10 @@ class Update { case "lib" | "git": var lib:Library = { name: libNode.att.name, - type: libNode.name + type: libNode.name, + skipDeps: libNode.has.skipDeps ? libNode.att.skipDeps == "true" : false, }; if (libNode.has.global) lib.global = libNode.att.global; - if (libNode.has.skipDeps) lib.skipDeps = libNode.att.skipDeps; switch (lib.type) { case "lib": if (libNode.has.version) lib.version = libNode.att.version; @@ -139,7 +139,7 @@ class Update { case INSTALL: var lib:Library = event.data; var globalSuffix:Null = lib.global == "true" ? " --global" : ""; - var skipDeps = lib.skipDeps == "true" ? " --skip-dependencies" : ""; + var skipDeps = lib.skipDeps ? " --skip-dependencies" : ""; var commandPrefix = commandSuffix + globalSuffix + skipDeps;// + " --no-timeout"; switch(lib.type) { case "lib": @@ -276,8 +276,8 @@ class Update { typedef Library = { var name:String; var type:String; + var skipDeps:Bool; var ?global:String; - var ?skipDeps:String; var ?recursive:String; var ?version:String; var ?ref:String;