r494 - trunk/scripts

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Feb 19 20:14:28 EST 2008


Author: icculus
Date: 2008-02-19 20:14:28 -0500 (Tue, 19 Feb 2008)
New Revision: 494

Modified:
   trunk/scripts/mojosetup_mainline.lua
Log:
Let most of the installer be automated from the commandline.


Modified: trunk/scripts/mojosetup_mainline.lua
===================================================================
--- trunk/scripts/mojosetup_mainline.lua	2008-02-20 01:13:53 UTC (rev 493)
+++ trunk/scripts/mojosetup_mainline.lua	2008-02-20 01:14:28 UTC (rev 494)
@@ -1170,7 +1170,7 @@
     -- Next stage: accept all global EULAs. Rejection of any EULA is considered
     --  fatal. These are global EULAs for the install, per-option EULAs come
     --  later.
-    if install.eulas ~= nil then
+    if (install.eulas ~= nil) and (not MojoSetup.cmdline("i-agree-to-all-licenses")) then
         for k,eula in pairs(install.eulas) do
             local desc = eula.description
             local fname = "data/" .. eula.source
@@ -1189,7 +1189,7 @@
     end
 
     -- Next stage: show any READMEs.
-    if install.readmes ~= nil then
+    if (install.readmes ~= nil) and (not MojoSetup.cmdline("noreadme")) then
         for k,readme in pairs(install.readmes) do
             local desc = readme.description
             -- !!! FIXME: pull from archive?
@@ -1205,8 +1205,11 @@
     --  The config file can force a destination if it has a really good reason
     --  (system drivers that have to go in a specific place, for example),
     --  but really really shouldn't in 99% of the cases.
+    local destcmdline = MojoSetup.cmdlinestr("destination")
     if install.destination ~= nil then
         set_destination(install.destination)
+    elseif destcmdline ~= nil then
+        set_destination(destcmdline)
     else
         local recommend = nil
         local recommended_cfg = install.recommended_destinations




More information about the mojosetup-commits mailing list