diff options
author | Adam <adamdharrison@gmail.com> | 2022-09-18 22:50:16 -0400 |
---|---|---|
committer | Adam <adamdharrison@gmail.com> | 2022-09-18 22:50:16 -0400 |
commit | f806a1041a1e80afb2f3146d90a759ee710a47c7 (patch) | |
tree | d47bb808336306f25b4a4de4aef22dbea18d4149 | |
parent | 9729829d2bdd378ef63184af4c0c7fb8fedf8943 (diff) | |
download | lite-xl-plugin-manager-f806a1041a1e80afb2f3146d90a759ee710a47c7.tar.gz lite-xl-plugin-manager-f806a1041a1e80afb2f3146d90a759ee710a47c7.zip |
Fixed a few things.
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | manifest.json | 6 | ||||
-rw-r--r-- | plugins/plugin_manager/init.lua | 14 |
3 files changed, 12 insertions, 12 deletions
@@ -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 |