Update sPhone.lua

This commit is contained in:
Ale32bit 2015-10-11 11:30:42 +02:00
parent b997aa2817
commit 62a8b83c14

View file

@ -44,8 +44,8 @@ local function recovery()
print("2: Update sPhone") print("2: Update sPhone")
print("3: Continue Booting") print("3: Continue Booting")
while true do while true do
local _, k = os.pullEvent("char") local _, k = os.pullEvent("key")
if k == 1 then if k == 2 then
for k, v in pairs(fs.list("/")) do for k, v in pairs(fs.list("/")) do
if not fs.isReadOnly(v) then if not fs.isReadOnly(v) then
fs.delete(v) fs.delete(v)
@ -54,9 +54,9 @@ local function recovery()
print("Installing sPhone...") print("Installing sPhone...")
sleep(0.5) sleep(0.5)
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())() setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif k == 2 then
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif k == 3 then elseif k == 3 then
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
elseif k == 4 then
break break
end end
end end