Procházet zdrojové kódy

add shallow arg to test.lua

ruki před 6 roky
rodič
revize
a4404c8df5
2 změnil soubory, kde provedl 12 přidání a 8 odebrání
  1. 1 1
      packages/p/python2/xmake.lua
  2. 11 7
      scripts/test.lua

+ 1 - 1
packages/p/python2/xmake.lua

@@ -60,7 +60,7 @@ package("python2")
         local version = package:version()
         local envs = {PYTHONPATH = package:installdir("lib", "python" .. version:major() .. "." .. version:minor(), "site-packages")}
         package:addenv("PYTHONPATH", envs.PYTHONPATH)
-
+ 
         -- install resources
         local resources = 
         {

+ 11 - 7
scripts/test.lua

@@ -6,13 +6,14 @@ import("packages", {alias = "get_packages"})
 -- the options
 local options =
 {
-    {'v', "verbose",    "k",  nil, "Enable verbose information."   }
-,   {'D', "diagnosis",  "k",  nil, "Enable diagnosis information." }
-,   {'p', "plat",       "kv", nil, "Set the given platform."       }
-,   {'a', "arch",       "kv", nil, "Set the given architecture."   }
-,   {nil, "ndk",        "kv", nil, "Set the android NDK directory."}
-,   {nil, "mingw",      "kv", nil, "Set the MingW directory."      }
-,   {nil, "packages",   "vs", nil, "The package list."             }
+    {'v', "verbose",    "k",  nil, "Enable verbose information."     }
+,   {'D', "diagnosis",  "k",  nil, "Enable diagnosis information."   }
+,   {nil, "shallow",    "k",  nil, "Only install the root packages." }
+,   {'p', "plat",       "kv", nil, "Set the given platform."         }
+,   {'a', "arch",       "kv", nil, "Set the given architecture."     }
+,   {nil, "ndk",        "kv", nil, "Set the android NDK directory."  }
+,   {nil, "mingw",      "kv", nil, "Set the MingW directory."        }
+,   {nil, "packages",   "vs", nil, "The package list."               }
 }
 
 -- require packages
@@ -44,6 +45,9 @@ function _require_packages(argv, packages)
     if argv.diagnosis then
         table.insert(require_argv, "-D")
     end
+    if argv.shallow then
+        table.insert(require_argv, "--shallow")
+    end
     table.join2(require_argv, packages)
     os.execv("xmake", require_argv)
 end