package manager wip

This commit is contained in:
kepler155c@gmail.com
2019-11-09 22:01:40 -07:00
parent b1a24235ea
commit 7773ecd55d
3 changed files with 10 additions and 29 deletions

View File

@@ -14,4 +14,3 @@ if ccemux then
end end
end end
end end

View File

@@ -5,6 +5,15 @@
license = 'MIT', license = 'MIT',
install = [[ install = [[
local Util = require('opus.util') local Util = require('opus.util')
require('opus.config').load('lzwfs', {
enabled = false,
installed = false,
filters = {
'packages/',
'sys/',
'usr/config/',
}
}
local boot = Util.readTable('.startup.boot') local boot = Util.readTable('.startup.boot')
table.insert(boot.preload, 1, '/packages/lzwfs/startup.lua') table.insert(boot.preload, 1, '/packages/lzwfs/startup.lua')
Util.writeTable('.startup.boot', boot) Util.writeTable('.startup.boot', boot)

View File

@@ -1,27 +0,0 @@
local Config = require('opus.config')
local Util = require('opus.util')
local config = Config.load('lzwfs', {
enabled = false,
installed = false,
filters = {
'packages/',
'sys/',
'usr/config/',
}
})
if not config.installed then
-- insert lzwfs into boot startup
local boot = Util.readTable('.startup.boot')
table.insert(boot.preload, 1, '/packages/lzwfs/startup.lua')
--Util.writeTable('.startup.boot', boot)
-- update config
config.installed = true
--Config.update('lzwfs', config)
print('Installing lzwfs - rebooting in 3 seconds')
os.sleep(3)
--os.reboot()
end