32 lines
665 B
Lua
32 lines
665 B
Lua
print("--- HCF ---")
|
|
print()
|
|
|
|
-- Colored print for code readability
|
|
local function printcolor(text, clr)
|
|
local old = term.getTextColor()
|
|
term.setTextColor(clr)
|
|
print(text)
|
|
term.setTextColor(old)
|
|
end
|
|
|
|
-- Boot folder check
|
|
if fs.exists("/boot") then
|
|
for _, name in pairs(fs.list("/boot")) do
|
|
write(("- %s: "):format(name))
|
|
|
|
if name:sub(#name-3) == ".lua" then
|
|
local result, error = pcall(dofile, "/boot/" .. name)
|
|
|
|
if not result then
|
|
printcolor("ERR", colors.red)
|
|
printcolor(error, colors.gray)
|
|
else
|
|
printcolor("OK", colors.lime)
|
|
end
|
|
else
|
|
printcolor("???", colors.yellow)
|
|
end
|
|
end
|
|
end
|
|
|