Update sPhone.lua
This commit is contained in:
parent
a28d5feff3
commit
42d8803aab
1 changed files with 31 additions and 0 deletions
|
@ -41,6 +41,10 @@ local function kernel()
|
|||
devMode = false,
|
||||
}
|
||||
|
||||
if runningOnStartup then
|
||||
fs.open("/startup","r")
|
||||
end
|
||||
|
||||
if fs.exists("/.sPhone/config/username") then
|
||||
local u = fs.open("/.sPhone/config/username","r")
|
||||
sPhone.user = u.readLine()
|
||||
|
@ -552,6 +556,8 @@ local function kernel()
|
|||
|
||||
end
|
||||
|
||||
local runningOnStartup
|
||||
|
||||
term.setBackgroundColor(colors.black)
|
||||
term.clear()
|
||||
term.setCursorPos(1,1)
|
||||
|
@ -567,9 +573,34 @@ if not pocket or not term.isColor() then
|
|||
return
|
||||
end
|
||||
|
||||
local tArgs = {...}
|
||||
|
||||
os.oldPullEvent = os.pullEvent
|
||||
os.pullEvent = os.pullEventRaw
|
||||
|
||||
local argData = {
|
||||
["-u"] = false,
|
||||
["-s"] = false,
|
||||
}
|
||||
|
||||
if #tArgs > 0 then
|
||||
while #tArgs > 0 do
|
||||
local tArgs = table.remove(tArgs, 1)
|
||||
if argData[tArgs] ~= nil then
|
||||
argData[tArgs] = true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if argData["-u"] then
|
||||
print("Getting installer...")
|
||||
setfenv(loadstring(http.get("https://raw.githubusercontent.com/Sertex-Team/sPhone/master/src/installer.lua").readAll()),getfenv())()
|
||||
end
|
||||
|
||||
if argData["-s"] then
|
||||
runningOnStartup = true
|
||||
end
|
||||
|
||||
local ok, error = pcall(kernel)
|
||||
|
||||
if not ok then
|
||||
|
|
Loading…
Reference in a new issue