mirror of
https://github.com/kepler155c/opus
synced 2025-12-21 07:38:06 +00:00
packages stored in compressed state - experimental (with config option)
This commit is contained in:
@@ -20,7 +20,7 @@ local function loadDirectory(dir)
|
||||
return plugins
|
||||
end
|
||||
|
||||
local programDir = fs.getDir(shell.getRunningProgram())
|
||||
local programDir = fs.getDir(_ENV.arg[0])
|
||||
local plugins = loadDirectory(fs.combine(programDir, 'system'), { })
|
||||
|
||||
local page = UI.Page {
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
local BulkGet = require('opus.bulkget')
|
||||
local Config = require('opus.config')
|
||||
local Git = require('opus.git')
|
||||
local LZW = require('opus.compress.lzw')
|
||||
local Packages = require('opus.packages')
|
||||
local Tar = require('opus.compress.tar')
|
||||
local Util = require('opus.util')
|
||||
|
||||
local fs = _G.fs
|
||||
@@ -100,6 +103,12 @@ local function install(name, isUpdate, ignoreDeps)
|
||||
if not isUpdate then
|
||||
runScript(manifest.install)
|
||||
end
|
||||
|
||||
if Config.load('package').compression then
|
||||
local c = Tar.tar_string(packageDir)
|
||||
Util.writeFile(name .. '.tar.lzw', LZW.compress(c), 'wb')
|
||||
fs.delete(packageDir)
|
||||
end
|
||||
end
|
||||
|
||||
if action == 'list' then
|
||||
|
||||
Reference in New Issue
Block a user