Skip to content

Commit

Permalink
Automatic start a bundle update
Browse files Browse the repository at this point in the history
Signed-off-by: Stefano Babic <[email protected]>
  • Loading branch information
sbabic committed Oct 14, 2019
1 parent 3e08c38 commit 12aacaa
Showing 1 changed file with 12 additions and 15 deletions.
27 changes: 12 additions & 15 deletions SWUpdateGUI.lua
Original file line number Diff line number Diff line change
Expand Up @@ -917,20 +917,7 @@ app = ui.Application:new
onClick = function(self)
local count = 1
local app = self.Application
local w, h = app:getById("MainWindow").Drawable:getAttrs("WH")
local singleupd = searchupd(MEDIAPATH)
swulist = {}
if singleupd then
db.info ("Found Update File : " .. singleupd)
swulist = updtoswulist(MEDIAPATH, singleupd)
numswusinupd = #swulist
automaticreboot = true
app:addCoroutine(function()
app:sendswu(swulist)
end)
else
app:switchwindow("filebox-window")
end
app:switchwindow("filebox-window")
end
},
Button:new
Expand Down Expand Up @@ -1018,7 +1005,17 @@ progwin:setValue("Status", "hide")
netwin:setValue("Status", "hide")
app:addMember(progwin)

app:switchwindow("filebox-window")
local singleupd = searchupd(MEDIAPATH)
swulist = {}
if singleupd then
db.info ("Found Update File : " .. singleupd)
swulist = updtoswulist(MEDIAPATH, singleupd)
numswusinupd = #swulist
automaticreboot = true
app:addCoroutine(function()
app:sendswu(swulist)
end)
end

app:run()

Expand Down

0 comments on commit 12aacaa

Please sign in to comment.