1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-26 21:27:40 +00:00

package manager

This commit is contained in:
kepler155c@gmail.com
2019-01-09 06:59:19 -05:00
parent 4387264960
commit 4977ea94d7
4 changed files with 59 additions and 40 deletions

View File

@@ -1,5 +1,3 @@
_G.requireInjector(_ENV)
local Packages = require('packages')
local Util = require('util')
@@ -7,6 +5,10 @@ local fs = _G.fs
local help = _G.help
local shell = _ENV.shell
if not fs.exists('usr/config/packages') then
Packages:downloadList()
end
local appPaths = Util.split(shell.path(), '(.-):')
local luaPaths = Util.split(_G.LUA_PATH, '(.-);')
local helpPaths = Util.split(help.path(), '(.-):')
@@ -50,6 +52,5 @@ for name in pairs(Packages:installed()) do
end
help.setPath(table.concat(helpPaths, ':'))
shell.setPath(table.concat(appPaths, ':'))
_G.LUA_PATH = table.concat(luaPaths, ';')