1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-13 14:57:41 +00:00

better startup

This commit is contained in:
kepler155c@gmail.com
2017-09-26 15:18:44 -04:00
parent f2e1a39584
commit 13efde276d
5 changed files with 22 additions and 2131 deletions

View File

@@ -44,16 +44,9 @@ end
local function run(file, ...)
local s, m = loadfile(file, makeEnv())
if s then
local args = { ... }
s, m = pcall(function()
return s(table.unpack(args))
end)
return s(...)
end
if not s and m then
error('Error loading ' .. file .. '\n' .. m)
end
return m
error('Error loading ' .. file .. '\n' .. m)
end
local function runUrl(file, ...)
@@ -98,7 +91,7 @@ if not fs.exists('usr/config/shell') then
Util.writeTable('usr/config/shell', {
aliases = shell.aliases(),
path = 'usr/apps:sys/apps:' .. shell.path(),
LUA_PATH = '/sys/apis:/usr/apis',
lua_path = '/sys/apis:/usr/apis',
})
end
@@ -113,7 +106,7 @@ if config.aliases then
end
end
shell.setPath(config.path)
LUA_PATH = config.LUA_PATH
LUA_PATH = config.lua_path
-- extensions
local dir = 'sys/extensions'