mirror of
https://github.com/kepler155c/opus
synced 2025-06-03 15:14:10 +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
|
if not fs.exists(filename) then
|
||||||
Util.writeTable(filename, data)
|
Util.writeTable(filename, data)
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -30,8 +30,11 @@ for name, package in pairs(Packages:installed()) do
|
|||||||
fs.mount(table.unpack(Util.matches(package.mount)))
|
fs.mount(table.unpack(Util.matches(package.mount)))
|
||||||
end
|
end
|
||||||
|
|
||||||
addPath(appPaths, fs.combine(fs.combine('packages', name), 'apps'))
|
addPath(appPaths, fs.combine('packages', name))
|
||||||
addPath(luaPaths, fs.combine(fs.combine('packages', name), 'apis'))
|
local apiPath = fs.combine(fs.combine('packages', name), 'apis')
|
||||||
|
if fs.exists(apiPath) then
|
||||||
|
addPath(luaPaths, apiPath)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
shell.setPath(table.concat(appPaths, ':'))
|
shell.setPath(table.concat(appPaths, ':'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user