Skip to content

Commit

Permalink
Add a --noprompt option that disables the 'Finish' dialog.
Browse files Browse the repository at this point in the history
This makes it possible to do automated installations by combining the --i-agree-to-all-licenses, --noprompt and --destination options.
  • Loading branch information
Francois Gouget committed May 23, 2011
1 parent a9deca8 commit 9fe8552
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/mojosetup_mainline.lua
Expand Up @@ -1270,6 +1270,7 @@ local function do_install(install)
local skipeulas = MojoSetup.cmdline("i-agree-to-all-licenses")
local skipreadmes = MojoSetup.cmdline("noreadme")
local skipoptions = MojoSetup.cmdline("nooptions")
local skipprompt = MojoSetup.cmdline("noprompt")

-- !!! FIXME: try to sanity check everything we can here
-- !!! FIXME: (unsupported URLs, bogus media IDs, etc.)
Expand Down Expand Up @@ -1792,9 +1793,11 @@ local function do_install(install)
end

-- Next stage: show results gui
stages[#stages+1] = function(thisstage, maxstage)
MojoSetup.gui.final(_("Installation was successful."))
return 1 -- go forward.
if not skipprompt then
stages[#stages+1] = function(thisstage, maxstage)
MojoSetup.gui.final(_("Installation was successful."))
return 1 -- go forward.
end
end

-- Now make all this happen.
Expand Down

0 comments on commit 9fe8552

Please sign in to comment.