transition to kernel

This commit is contained in:
kepler155c@gmail.com
2018-01-21 17:22:59 -05:00
parent e6ed08315e
commit 8451c94abe
7 changed files with 48 additions and 196 deletions

View File

@@ -38,6 +38,7 @@ local function loadApplications()
local requirements = {
turtle = function() return turtle end,
advancedTurtle = function() return turtle and term.isColor() end,
advanced = function() return term.isColor() end,
pocket = function() return pocket end,
advancedPocket = function() return pocket and term.isColor() end,
advancedComputer = function() return not turtle and not pocket and term.isColor() end,
@@ -45,6 +46,14 @@ local function loadApplications()
applications = Util.readTable('sys/etc/app.db')
if fs.exists('usr/etc/apps') then
local dbs = fs.list('usr/etc/apps')
for _, db in pairs(dbs) do
local apps = Util.readTable('usr/etc/apps/' .. db) or { }
Util.merge(applications, apps)
end
end
if fs.exists(REGISTRY_DIR) then
local files = fs.list(REGISTRY_DIR)
for _,file in pairs(files) do