mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 01:10:19 -04:00
Update init.lua
This commit is contained in:
parent
8ff73598db
commit
6c808e75c1
@ -83,6 +83,11 @@ local function boot(kernel)
|
|||||||
dofile(kernel.address, kernel.fpx .. kernel.file)
|
dofile(kernel.address, kernel.fpx .. kernel.file)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function labelText(fs)
|
||||||
|
local lbl = component.invoke(fs, "getLabel")
|
||||||
|
if lbl then return " ('"..lbl.."')" else return "" end
|
||||||
|
end
|
||||||
|
|
||||||
status(_OSVERSION)
|
status(_OSVERSION)
|
||||||
status("Select what to boot:")
|
status("Select what to boot:")
|
||||||
|
|
||||||
@ -92,7 +97,7 @@ for fs in component.list("filesystem") do
|
|||||||
if component.invoke(fs, "isDirectory", "boot/kernel/")then
|
if component.invoke(fs, "isDirectory", "boot/kernel/")then
|
||||||
for _,file in ipairs(component.invoke(fs, "list", "boot/kernel/")) do
|
for _,file in ipairs(component.invoke(fs, "list", "boot/kernel/")) do
|
||||||
osList[#osList+1] = {fpx = "boot/kernel/", file = file, address = fs}
|
osList[#osList+1] = {fpx = "boot/kernel/", file = file, address = fs}
|
||||||
status(tostring(#osList).."."..file.." from "..(fs:sub(1,3)))
|
status(tostring(#osList).."."..file.." from "..(fs:sub(1,3))..labelText(fs))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if fs ~= computer.getBootAddress() and component.invoke(fs, "exists", "init.lua") then
|
if fs ~= computer.getBootAddress() and component.invoke(fs, "exists", "init.lua") then
|
||||||
@ -104,7 +109,7 @@ for fs in component.list("filesystem") do
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
osList[#osList+1] = {fpx = "", file = "init.lua", address = fs}
|
osList[#osList+1] = {fpx = "", file = "init.lua", address = fs}
|
||||||
status(tostring(#osList).."."..osName.." from "..(fs:sub(1,3)))
|
status(tostring(#osList).."."..osName.." from "..(fs:sub(1,3))..labelText(fs))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
status("Select os: ")
|
status("Select os: ")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user