Compare commits
11 Commits
1.2.4-dev
...
030e5bfd96
| Author | SHA1 | Date | |
|---|---|---|---|
| 030e5bfd96 | |||
| 099638c735 | |||
| 4f9eebade2 | |||
| 5172da1b5b | |||
| d08935b68a | |||
| 45b46cf3c4 | |||
| aeea68bc9b | |||
| f983b13d56 | |||
| 03c5b106c4 | |||
| 08323e00ff | |||
| 5e3cdbe40c |
@@ -130,18 +130,22 @@ if not initCfgStatus then
|
||||
end
|
||||
kernel.config = config
|
||||
|
||||
local skip=false
|
||||
for i,v in ipairs(split(fstab,"\n")) do
|
||||
if v:sub(1,1)=="U" then
|
||||
local id=""
|
||||
for i=3,#v do
|
||||
if v:sub(i,i)==";" then
|
||||
if i==3 then kernel.log("Invalid fstab line... Skipping.","WARN") goto endline end
|
||||
if i==3 then kernel.log("Invalid fstab line... Skipping.","WARN") skip = true break end
|
||||
id=v:sub(3,i-1)
|
||||
end
|
||||
end
|
||||
if not skip then
|
||||
local path=v:sub(#id+4)
|
||||
ifs.mount(id,path)
|
||||
::endline::
|
||||
else
|
||||
skip=false
|
||||
end
|
||||
end
|
||||
end
|
||||
kernel.log("Disks initialized")
|
||||
@@ -265,15 +269,13 @@ for _,p in ipairs(modules) do
|
||||
if kernel.config.showModLoad then kernel.log("Loading module "..v, "DBUG", 5) end
|
||||
local code=ifs.readAllText(v)
|
||||
if not code then
|
||||
kernel.log("ModuReadErr: "..v, "WARN", 8)
|
||||
goto skip
|
||||
kernel.panic("Failed to read module "..v)
|
||||
end
|
||||
local func,err=load(code,"@"..v)
|
||||
if not func then kernel.panic("ModuLoadErr: "..tostring(err)) goto skip end
|
||||
if not func then kernel.panic("ModuLoadErr: "..tostring(err)) end
|
||||
local status, err = xpcall(func,debug.traceback, kernel)
|
||||
if not status then kernel.panic("ModuRunErr: "..tostring(err)) end
|
||||
if kernel.config.showModLoad then kernel.log("Loaded module "..v, "DBUG", 5) end
|
||||
::skip::
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ local function doLogin()
|
||||
syscall.write(1, "Username: ")
|
||||
local username = readLine(nil)
|
||||
|
||||
if username == "" then goto continue end
|
||||
if username ~= "" then
|
||||
|
||||
syscall.write(1, "Password: ")
|
||||
local password = readLine("*")
|
||||
@@ -154,8 +154,7 @@ local function doLogin()
|
||||
syscall.write(1, "Login incorrect.\n\n")
|
||||
syscall.devctl(1, "sfgc", 1)
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
|
||||
syscall.devctl(1, "sfgc", 2)
|
||||
|
||||
@@ -308,7 +308,7 @@ local history = {}
|
||||
|
||||
while true do
|
||||
local code = getUserInput("lua> ", history)
|
||||
if code == "" then goto continue end
|
||||
if code ~= "" then
|
||||
|
||||
while isIncomplete(code) do
|
||||
code = code .. "\n" .. getUserInput("... ", nil)
|
||||
@@ -319,5 +319,5 @@ while true do
|
||||
end
|
||||
|
||||
runCode(code)
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
|
||||
@@ -139,12 +139,9 @@ local function parseCommands(src)
|
||||
local c = src:sub(pos, pos)
|
||||
if c == "\n" or c == ";" then
|
||||
pos = pos + 1
|
||||
goto continue
|
||||
end
|
||||
if c == "#" then
|
||||
elseif c == "#" then
|
||||
while pos <= len and src:sub(pos,pos) ~= "\n" do pos = pos + 1 end
|
||||
goto continue
|
||||
end
|
||||
else
|
||||
|
||||
local addr1, addr2
|
||||
addr1, pos = parseAddr(src, pos)
|
||||
@@ -203,8 +200,7 @@ local function parseCommands(src)
|
||||
elseif cmd == "\n" or cmd == ";" then
|
||||
else
|
||||
end
|
||||
|
||||
::continue::
|
||||
end
|
||||
end
|
||||
|
||||
return cmds
|
||||
|
||||
Binary file not shown.
@@ -4,24 +4,18 @@ term.clear()
|
||||
print("Do you want to install HyperionOS? [Y/n]")
|
||||
local input=read()
|
||||
if input=="y" or input=="Y" or input=="" then
|
||||
goto install
|
||||
else
|
||||
goto exit
|
||||
print("Installing tar but bad...")
|
||||
shell.run("wget https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/install/data/tarbad /tar.lua")
|
||||
print("Installing HyperionOS...")
|
||||
print("Installing precompiled tar")
|
||||
shell.run("wget https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/main/install/data/Build.tar /Build.tar")
|
||||
shell.run("tar Build.tar /")
|
||||
print("Removing tar but bad...")
|
||||
shell.run("rm /tar.lua")
|
||||
shell.run("rm $")
|
||||
shell.run("cp Build $")
|
||||
shell.run("rm Build")
|
||||
shell.run("rm Build.tar")
|
||||
fs.copy("/$/boot/cct/eeprom","/startup.lua")
|
||||
dofile("startup.lua")
|
||||
end
|
||||
|
||||
::install::
|
||||
print("Installing tar but bad...")
|
||||
shell.run("wget https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/1.2-dev/install/data/tarbad /tar.lua")
|
||||
print("Installing HyperionOS...")
|
||||
print("Installing precompiled tar")
|
||||
shell.run("wget https://git.astronand.dev/Hyperion/HyperionOS/raw/branch/1.2-dev/install/data/Build.tar /Build.tar")
|
||||
shell.run("tar Build.tar /")
|
||||
print("Removing tar but bad...")
|
||||
shell.run("rm /tar.lua")
|
||||
shell.run("rm $")
|
||||
shell.run("cp Build $")
|
||||
shell.run("rm Build")
|
||||
shell.run("rm Build.tar")
|
||||
fs.copy("/$/boot/cct/eeprom","/startup.lua")
|
||||
dofile("startup.lua")
|
||||
::exit::
|
||||
Reference in New Issue
Block a user