summaryrefslogtreecommitdiff
path: root/xmake/modules/private/utils/progress.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2021-02-20 10:25:49 +0800
committerruki <[email protected]>2021-02-20 10:25:49 +0800
commit5f25a00cd3f3708ad133dbd1c376cfdd34a3de94 (patch)
tree7815e0fce42dec2fb8a2b749959d0f50f0678e2b /xmake/modules/private/utils/progress.lua
parentbf08fd02abb79831f72598a9347e9a7b3ac87989 (diff)
add batchcmds
Diffstat (limited to 'xmake/modules/private/utils/progress.lua')
-rw-r--r--xmake/modules/private/utils/progress.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/modules/private/utils/progress.lua b/xmake/modules/private/utils/progress.lua
index e00b4ab57..5c08cbf8f 100644
--- a/xmake/modules/private/utils/progress.lua
+++ b/xmake/modules/private/utils/progress.lua
@@ -111,6 +111,16 @@ function show(progress, format, ...)
end
end
+-- get the message text with process
+function text(progress, format, ...)
+ local progress_prefix = "${color.build.progress}" .. theme.get("text.build.progress_format") .. ":${clear} "
+ if option.get("verbose") then
+ return string.format(progress_prefix .. "${dim}" .. format, progress, ...)
+ else
+ return string.format(progress_prefix .. format, progress, ...)
+ end
+end
+
-- build a progress indicator
-- @params stream - stream to write to, will use io.stdout if not provided
-- @params opt - options