Минимальный startup.lua
Пока что здесь только проверка бут-скриптов...
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
|||||||
|
-- H1N1's Framework
|
||||||
|
print("--- H1N1's Framework ---")
|
||||||
|
print()
|
||||||
|
|
||||||
|
-- Colored print for code readability
|
||||||
|
local function colorprint(text, clr)
|
||||||
|
local old = text.getTextColor()
|
||||||
|
text.setTextColor(clr)
|
||||||
|
print(text)
|
||||||
|
text.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
|
||||||
|
|
||||||
Reference in New Issue
Block a user