1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-12 14:27:41 +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

@@ -11,10 +11,10 @@ end
if not fs.exists('usr/autorun') then
fs.makeDir('usr/autorun')
end
if not fs.exists('usr/config/fstab') then
Util.writeFile('usr/config/fstab',
'usr gitfs kepler155c/opus-apps/' .. _G.OPUS_BRANCH)
end
--if not fs.exists('usr/config/fstab') then
-- Util.writeFile('usr/config/fstab',
-- 'usr gitfs kepler155c/opus-apps/' .. _G.OPUS_BRANCH)
--end
if not fs.exists('usr/config/shell') then
Util.writeTable('usr/config/shell', {

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)