mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-22 03:43:44 +01:00
improve sysupdate output
This commit is contained in:
parent
2472b2ceeb
commit
e39f087b5b
1 changed files with 13 additions and 1 deletions
|
@ -7,7 +7,19 @@ local function run(cmd)
|
||||||
_, _, exit_code = handle:close()
|
_, _, exit_code = handle:close()
|
||||||
|
|
||||||
if exit_code == 0 then
|
if exit_code == 0 then
|
||||||
print("running \27[32m" .. cmd .. "\27[0m\n")
|
-- 8 is len of text around "running" prompt
|
||||||
|
local len = #cmd + 8
|
||||||
|
local hr = string.rep("=", len)
|
||||||
|
|
||||||
|
print(
|
||||||
|
string.format(
|
||||||
|
"%s\nrunning \27[32m%s\27[0m\n%s\n",
|
||||||
|
hr,
|
||||||
|
cmd,
|
||||||
|
hr
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
os.execute(cmd)
|
os.execute(cmd)
|
||||||
else
|
else
|
||||||
print("\27[31mCouldn't find process with name " .. pname .. "\27[0m in path.")
|
print("\27[31mCouldn't find process with name " .. pname .. "\27[0m in path.")
|
||||||
|
|
Loading…
Reference in a new issue