package manager wip

This commit is contained in:
kepler155c@gmail.com
2019-11-09 21:17:07 -07:00
parent 3255a5a670
commit b1a24235ea
4 changed files with 38 additions and 17 deletions

View File

@@ -3,4 +3,17 @@
repository = 'kepler155c/opus-apps/{{OPUS_BRANCH}}/lzwfs',
description = [[ Disk compression ]],
license = 'MIT',
install = [[
local Util = require('opus.util')
local boot = Util.readTable('.startup.boot')
table.insert(boot.preload, 1, '/packages/lzwfs/startup.lua')
Util.writeTable('.startup.boot', boot)
]],
uninstall = [[
local Array = require('opus.array')
local Util = require('opus.util')
local boot = Util.readTable('.startup.boot')
Array.removeByValue(boot.preload or { }, '/packages/lzwfs/startup.lua')
Util.writeTable('.startup.boot', boot)
]]
}

View File

@@ -15,13 +15,13 @@ 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)
--Util.writeTable('.startup.boot', boot)
-- update config
config.installed = true
Config.update('lzwfs', config)
--Config.update('lzwfs', config)
print('Installing lzwfs - rebooting in 3 seconds')
os.sleep(3)
os.reboot()
--os.reboot()
end