Update installer.lua
This commit is contained in:
parent
e5a23bd9e9
commit
625e566ecb
1 changed files with 14 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue