Update installer.lua

This commit is contained in:
Ale32bit 2016-11-24 22:18:09 +01:00 committed by GitHub
parent e5a23bd9e9
commit 625e566ecb

View file

@ -212,6 +212,20 @@ term.setCursorPos(1,12)
term.clearLine() term.clearLine()
center(" "..filesDownloaded.."/"..fileCount, 12) center(" "..filesDownloaded.."/"..fileCount, 12)
local data = {}
if fs.exists("/.sPhone/config/sPhone") then
local f = fs.open("/.sPhone/config/sPhone","r")
local con = f.readAll()
f.close()
con = textutils.unserialize(con)
data = con
end
data["updated"] = true
local f = fs.open("/.sPhone/config/sPhone","w")
f.write(textutils.serialize(data))
f.close()
if not fs.exists("/startup") then if not fs.exists("/startup") then
fs.copy("/.sPhone/startup","/startup") fs.copy("/.sPhone/startup","/startup")
end end