summaryrefslogtreecommitdiff
path: root/scripts/mkimport
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-12-09 23:07:13 +0100
committerPhilipp Gesang <phg42.2a@gmail.com>2014-12-09 23:07:13 +0100
commitc8808efcf8bd69b6038627f92298818d9028c088 (patch)
tree4ee748ffa7bfbeeea55a3f1a2b254e45f67b970a /scripts/mkimport
parentff9c47695c00c96ade844f4b2644fca5e1f96be1 (diff)
downloadluaotfload-c8808efcf8bd69b6038627f92298818d9028c088.tar.gz
[import] unify appearance
Diffstat (limited to 'scripts/mkimport')
-rw-r--r--scripts/mkimport18
1 files changed, 12 insertions, 6 deletions
diff --git a/scripts/mkimport b/scripts/mkimport
index fe9f4b4..1b4dc39 100644
--- a/scripts/mkimport
+++ b/scripts/mkimport
@@ -70,6 +70,12 @@ local msg = function (...)
iowrite "\n"
end
+local separator_string = string.rep ("-", 79)
+local separator = function ()
+ iowrite (separator_string)
+ iowrite "\n"
+end
+
local good_tag = stringformat("[\x1b[1;30;%dmgood\x1b[0m] · ", 42)
local bad_tag = stringformat("[\x1b[1;30;%dmBAD\x1b[0m] · ", 41)
local alert_tag = stringformat("[\x1b[1;%dmalert\x1b[0m] · " , 36)
@@ -233,14 +239,14 @@ local summarize_news = function (status)
local ng = #status.good
local nm = #status.missing
- msg "-----------------------------------------------------------------"
+ separator ()
msg ("Summary: Inspected %d files.", ni + nc + ng + nm)
- msg "-----------------------------------------------------------------"
+ separator ()
if ng > 0 then good ("%d are up to date", ng) end
if ni > 0 then attention ("%d changed" , ni) end
if nc > 0 then attention ("%d new" , nc) end
if nm > 0 then bad ("%d missing" , nm) end
- msg "-----------------------------------------------------------------"
+ separator ()
if nm == 0 and nc == 0 and ni == 0 then
return 0
@@ -349,13 +355,13 @@ local summarize_status = function (counters)
local failed = counters[import_failed ] or 0
local sum = imported + skipped + created + failed
if sum < 1 then die ("garbage total of imported files: %s", sum) end
- status ("-----------------------------------------------------------------")
+ separator ()
status (" RESULT: %d files processed", sum)
- status ("-----------------------------------------------------------------")
+ separator ()
if created > 0 then status ("created: %d (%d %%)", created , created * 100 / sum) end
if imported > 0 then status ("imported: %d (%d %%)", imported, imported * 100 / sum) end
if skipped > 0 then status ("skipped: %d (%d %%)", skipped , skipped * 100 / sum) end
- status ("-----------------------------------------------------------------")
+ separator ()
end
local import_file = function (name, kind, def, cat)