aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Harrison <adamdharrison@gmail.com>2022-11-03 20:04:08 -0400
committerAdam Harrison <adamdharrison@gmail.com>2022-11-03 20:04:08 -0400
commitc40793df85f402f26efab64c96387318a9c8c514 (patch)
tree26d96987d6e2561537411a83226b68a8f73916a2
parent9c656760ac767cc5ef5a49a96c220cb54bbe3e98 (diff)
downloadlite-xl-plugin-manager-c40793df85f402f26efab64c96387318a9c8c514.tar.gz
lite-xl-plugin-manager-c40793df85f402f26efab64c96387318a9c8c514.zip
Changed format of bare plugins slightly.
-rw-r--r--src/lpm.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lpm.lua b/src/lpm.lua
index ea75c70..4dc1c01 100644
--- a/src/lpm.lua
+++ b/src/lpm.lua
@@ -526,7 +526,7 @@ end
function Plugin:is_core(bottle) return self.type == "core" end
function Plugin:is_bundled(bottle) return self.type == "bundled" end
function Plugin:is_installed(bottle) return self:is_core(bottle) or (bottle.lite_xl:is_compatible(self) and system.stat(self:get_install_path(bottle))) end
-function Plugin:is_incompatible(plugin) return self.dependencies[plugin.name] and not match_version(plugin.version, dependencies[plugin.name]) end
+function Plugin:is_incompatible(plugin) return self.dependencies[plugin.name] and not match_version(plugin.version, self.dependencies[plugin.name]) end
function Plugin:get_path(bottle)
return self:is_installed(bottle) and self:get_install_path(bottle) or self.local_path
@@ -601,11 +601,13 @@ function Plugin:install(bottle, installing)
local _, _, url, branch = self.remote:find("^(.*):(.*)$")
system.init(temporary_install_path, url)
common.reset(temporary_install_path, branch)
- else
+ elseif self.path then
local path = install_path .. (self.organization == 'complex' and self.path and system.stat(self.local_path).type ~= "dir" and (PATHSEP .. "init.lua") or "")
local temporary_path = temporary_install_path .. (self.organization == 'complex' and self.path and system.stat(self.local_path).type ~= "dir" and (PATHSEP .. "init.lua") or "")
log_action("Copying " .. self.local_path .. " to " .. path)
common.copy(self.local_path, temporary_path)
+ elseif self.organization == 'complex' then
+ common.mkdirp(temporary_install_path)
end
for i,file in ipairs(self.files or {}) do
if not file.arch or file.arch == ARCH then