fix: debug into build.lua

This commit is contained in:
əlemi 2024-09-05 05:22:21 +02:00
parent 64bb920f76
commit 7297eaa87d
Signed by: alemi
GPG key ID: A4895B84D311642C

View file

@ -1,4 +1,6 @@
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
local native_path = plugin_dir .. "/native.so" -- TODO get extension based on platform local native_path = plugin_dir .. "/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
vim.system({"curl", "-s", "-o", native_path, download_url }) -- TODO can we run this asynchronously? print("downloading '" .. download_url .. "' into " .. native_path)
local res = vim.system({"curl", "-s", "-o", native_path, download_url }):wait() -- TODO can we run this asynchronously?
print("downloaded: " .. res)