Skip to content

Commit

Permalink
Let most of the installer be automated from the commandline.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 20, 2008
1 parent 102cfba commit 1826dc1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/mojosetup_mainline.lua
Expand Up @@ -1170,7 +1170,7 @@ local function do_install(install)
-- 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
Expand All @@ -1189,7 +1189,7 @@ local function do_install(install)
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?
Expand All @@ -1205,8 +1205,11 @@ local function do_install(install)
-- 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
Expand Down

0 comments on commit 1826dc1

Please sign in to comment.