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