aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--manifest.json6
-rw-r--r--plugins/plugin_manager/init.lua14
3 files changed, 12 insertions, 12 deletions
diff --git a/README.md b/README.md
index ce3ad0c..4037945 100644
--- a/README.md
+++ b/README.md
@@ -43,11 +43,11 @@ lpm rm https://github.com/lite-xl/lite-xl-plugins.git
### Linux
```
-VERSION=0.1 ./build.sh -DLPM_VERSION='"'$VERSION-x86_64-linux-`git rev-parse --short HEAD`'"'
+./build.sh -DLPM_VERSION='"'0.1-x86_64-linux-`git rev-parse --short HEAD`'"'
```
### Linux to Windows
```
-VERSION=0.1 CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres CURL_CONFIGURE="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows" GIT2_CONFIGURE="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DBUILD_CLAR=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DDLLTOOL=x86_64-w64-mingw32-dlltool" SSL_CONFIGURE=mingw ./build.sh -DLPM_VERSION='"'$VERSION-x86_64-windows-`git rev-parse --short HEAD`'"'
+CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-gcc-ar WINDRES=x86_64-w64-mingw32-windres CURL_CONFIGURE="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows" GIT2_CONFIGURE="-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY -DBUILD_CLAR=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_SYSTEM_NAME=Windows -DDLLTOOL=x86_64-w64-mingw32-dlltool" SSL_CONFIGURE=mingw ./build.sh -DLPM_VERSION='"'$VERSION-x86_64-windows-`git rev-parse --short HEAD`'"'
```
diff --git a/manifest.json b/manifest.json
index 8b5c26a..3a142a9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -7,11 +7,11 @@
"mod_version": 3,
"provides": ["plugin-manager"],
"files": [{
- "url": "https://github.com/adamharrison/lite-xl-plugin-manager/releases/download/v0.1/lpm-x86_64-linux",
+ "url": "https://github.com/adamharrison/lite-xl-plugin-manager/releases/download/v0.1/lpm.x86_64-linux",
"arch": "x86_64-linux",
- "checksum": "0019dfc4b32d63c1392aa264aed2253c1e0c2fb09216f8e2cc269bbfb8bb49b5"
+ "checksum": "88f0b399b9b97725cc907ee3382148bc921cbc52b3c1ba10640d68c369c6304b"
}, {
- "url": "https://github.com/adamharrison/lite-xl-plugin-manager/releases/download/v0.1/lpm-x86_64-windows.exe",
+ "url": "https://github.com/adamharrison/lite-xl-plugin-manager/releases/download/v0.1/lpm.x86_64-windows.exe",
"arch": "x86_64-windows",
"checksum": "16a5910e06de1df4d3252ee41db46426ee723fc6417de5c87b26b7bada2aa68f"
}],
diff --git a/plugins/plugin_manager/init.lua b/plugins/plugin_manager/init.lua
index 20a5b9d..6564e5b 100644
--- a/plugins/plugin_manager/init.lua
+++ b/plugins/plugin_manager/init.lua
@@ -29,13 +29,13 @@ config.plugins.plugin_manager = common.merge({
debug = false
}, config.plugins.plugin_manager)
-package.path = package.path .. ";" .. USERDIR .. "libraries/?.lua" .. ";" .. USERDIR .. "libraries/?/init.lua"
+package.path = package.path .. ";" .. USERDIR .. "/libraries/?.lua" .. ";" .. USERDIR .. "/libraries/?/init.lua" .. ";" .. DATADIR .. "/libraries/?.lua" .. ";" .. DATADIR .. "/libraries/?/init.lua"
if not config.plugins.plugin_manager.lpm_binary_path then
local paths = {
DATADIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
- DATADIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
- USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm" .. binary_extension,
+ USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. config.plugins.plugin_manager.lpm_binary_name,
+ DATADIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm" .. binary_extension,
USERDIR .. PATHSEP .. "plugins" .. PATHSEP .. "plugin_manager" .. PATHSEP .. "lpm" .. binary_extension,
}
local path, s = os.getenv("PATH"), 1
@@ -90,9 +90,9 @@ local function run(cmd)
local still_running = true
while true do
local chunk = v[1]:read_stdout(2048)
- if config.plugins.plugin_manager.debug then print(chunk) end
- if chunk and #chunk == 0 then break end
- if chunk ~= nil then
+ if config.plugins.plugin_manager.debug then io.stdout:write(chunk) end
+ if chunk and v[1]:running() and #chunk == 0 then break end
+ if chunk ~= nil and #chunk > 0 then
v[3] = v[3] .. chunk
has_chunk = true
else
@@ -101,7 +101,7 @@ local function run(cmd)
v[2]:resolve(v[3])
else
local err = v[1]:read_stderr(2048)
- core.error("error running lpm: " .. err)
+ core.error("error running lpm: " .. (err or "?"))
v[2]:reject(v[3])
end
break