1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-19 01:37:39 +00:00

web run applications

This commit is contained in:
kepler155c@gmail.com
2017-09-05 21:21:43 -04:00
parent f7a03b2eea
commit 9f5c58cc4c
10 changed files with 72 additions and 30 deletions

View File

@@ -22,6 +22,7 @@ end
requireInjector(getfenv(1))
local Config = require('config')
local Opus = require('opus')
local Util = require('util')
-- Begin multishell
@@ -462,27 +463,10 @@ end)
local function startup()
local hasError
local function runDir(directory, desc, open)
if not fs.exists(directory) then
return
end
local files = fs.list(directory)
table.sort(files)
for _,file in ipairs(files) do
print(desc .. file)
os.sleep(0)
local result, err = open(directory .. '/' .. file)
if not result then
printError(err)
hasError = true
end
end
if not Opus.loadExtensions() then
hasError = true
end
runDir('sys/extensions', '[ ext ] ', shell.run)
local overviewId = multishell.openTab({
path = 'sys/apps/Overview.lua',
focused = true,
@@ -491,9 +475,13 @@ local function startup()
})
overviewTab = tabs[overviewId]
runDir('sys/services', '[ svc ] ', shell.openHiddenTab)
runDir('sys/autorun', '[ aut ] ', shell.run)
runDir('usr/autorun', '[ aut ] ', shell.run)
if not Opus.loadServices() then
hasError = true
end
if not Opus.autorun() then
hasError = true
end
if hasError then
error('An autorun program has errored')