wrote source code
This commit is contained in:
18
lua/core/update.lua
Normal file
18
lua/core/update.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- ~/.config/nvim/lua/monovim/updater.lua
|
||||
local M = {}
|
||||
|
||||
M.update = function()
|
||||
print("MonoVim Core wird aktualisiert...")
|
||||
local config_path = vim.fn.stdpath("config")
|
||||
local handle = io.popen("cd " .. config_path .. " && git pull 2>&1")
|
||||
local result = handle:read("*a")
|
||||
handle:close()
|
||||
|
||||
if result:find("Already up to date") then
|
||||
print("MonoVim ist bereits aktuell.")
|
||||
else
|
||||
print("Update erfolgreich! Bitte neu starten.")
|
||||
end
|
||||
end
|
||||
|
||||
return M
|
||||
Reference in New Issue
Block a user