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

package management

This commit is contained in:
kepler155c@gmail.com
2018-11-03 18:13:41 -04:00
parent 88f126bf2f
commit c478781cba
10 changed files with 110 additions and 43 deletions

View File

@@ -26,11 +26,17 @@ end
-- https://github.com/mpeterv/depgraph/blob/master/src/depgraph/init.lua
for name, package in pairs(Packages:installed()) do
if package.mount then
fs.mount(table.unpack(Util.matches(package.mount)))
local packageDir = fs.combine('packages', name)
debug(fs.combine(packageDir, '.install'))
if fs.exists(fs.combine(packageDir, '.install')) then
local install = Util.readTable(fs.combine(packageDir, '.install'))
if install and install.mount then
debug('mounting: ' .. install.mount)
fs.mount(table.unpack(Util.matches(install.mount)))
end
end
addPath(appPaths, fs.combine('packages', name))
addPath(appPaths, packageDir)
local apiPath = fs.combine(fs.combine('packages', name), 'apis')
if fs.exists(apiPath) then
addPath(luaPaths, apiPath)