mirror of
https://github.com/kepler155c/opus
synced 2025-01-11 16:20:26 +00:00
package manager wip
This commit is contained in:
parent
b7176e55ad
commit
97c4b7a090
@ -15,7 +15,10 @@ function Config.load(fname, data)
|
||||
if not fs.exists(filename) then
|
||||
Util.writeTable(filename, data)
|
||||
else
|
||||
Util.merge(data, Util.readTable(filename) or { })
|
||||
local contents = Util.readTable(filename) or
|
||||
error('Configuration file is corrupt:' .. filename)
|
||||
|
||||
Util.merge(data, contents)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -30,8 +30,11 @@ for name, package in pairs(Packages:installed()) do
|
||||
fs.mount(table.unpack(Util.matches(package.mount)))
|
||||
end
|
||||
|
||||
addPath(appPaths, fs.combine(fs.combine('packages', name), 'apps'))
|
||||
addPath(luaPaths, fs.combine(fs.combine('packages', name), 'apis'))
|
||||
addPath(appPaths, fs.combine('packages', name))
|
||||
local apiPath = fs.combine(fs.combine('packages', name), 'apis')
|
||||
if fs.exists(apiPath) then
|
||||
addPath(luaPaths, apiPath)
|
||||
end
|
||||
end
|
||||
|
||||
shell.setPath(table.concat(appPaths, ':'))
|
||||
|
Loading…
Reference in New Issue
Block a user