From 625e566ecb34aa9296583892e0a226996f4b0f86 Mon Sep 17 00:00:00 2001 From: Ale32bit Date: Thu, 24 Nov 2016 22:18:09 +0100 Subject: [PATCH] Update installer.lua --- src/installer.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/installer.lua b/src/installer.lua index 19a7fdf..ec16bb5 100644 --- a/src/installer.lua +++ b/src/installer.lua @@ -212,6 +212,20 @@ term.setCursorPos(1,12) term.clearLine() 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 fs.copy("/.sPhone/startup","/startup") end