mirror of
https://github.com/kepler155c/opus
synced 2025-10-26 21:27:40 +00:00
package manager
This commit is contained in:
@@ -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, ';')
|
||||
|
||||
Reference in New Issue
Block a user