mirror of
https://github.com/hexedtech/codemp-nvim.git
synced 2024-11-22 15:34:53 +01:00
chore: added old attempt at platform specific code
This commit is contained in:
parent
37005abdb2
commit
cce2cc5a37
1 changed files with 19 additions and 0 deletions
19
build.lua
19
build.lua
|
@ -1,5 +1,24 @@
|
||||||
local plugin_dir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h") -- got this from https://lazy.folke.io/developers#building
|
local plugin_dir = vim.fn.fnamemodify(debug.getinfo(1, "S").source:sub(2), ":p:h") -- got this from https://lazy.folke.io/developers#building
|
||||||
|
|
||||||
|
-- -- TODO not the best loader but a simple example? urls dont work
|
||||||
|
-- local host_os = vim.loop.os_uname().sysname
|
||||||
|
-- local ext = nil
|
||||||
|
-- if host_os == "Windows" then ext = ".dll"
|
||||||
|
-- elseif host_os == "Mac" then ext = ".dylib"
|
||||||
|
-- else ext = ".so"
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- local shasum = nil
|
||||||
|
--
|
||||||
|
-- if vim.fn.filereadable(path .. 'native' .. ext) == 1 then
|
||||||
|
-- shasum = vim.fn.system("sha256sum " .. path .. 'native' .. ext)
|
||||||
|
-- end
|
||||||
|
--
|
||||||
|
-- local last_sum = vim.fn.system("curl -s https://codemp.alemi.dev/lib/lua/latest/sum")
|
||||||
|
--
|
||||||
|
-- if last_sum ~= shasum then
|
||||||
|
-- vim.fn.system("curl -o " .. path .. 'native' .. ext .. "https://codemp.alemi.dev/lib/lua/latest")
|
||||||
|
-- end
|
||||||
local native_path = plugin_dir .. "/lua/codemp/native.so" -- TODO get extension based on platform
|
local native_path = plugin_dir .. "/lua/codemp/native.so" -- TODO get extension based on platform
|
||||||
local download_url = "https://codemp.dev/releases/lua/codemp_native-linux.so" -- TODO get url based on platform
|
local download_url = "https://codemp.dev/releases/lua/codemp_native-linux.so" -- TODO get url based on platform
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue