Mercurial > prosody-hg
comparison tools/tb2err @ 11200:bf8f2da84007
Merge 0.11->trunk
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 05 Nov 2020 22:31:25 +0100 |
| parents | 13e2ac7b5798 |
| children | 414952def2d3 |
comparison
equal
deleted
inserted
replaced
| 11199:6c7c50a4de32 | 11200:bf8f2da84007 |
|---|---|
| 1 #!/usr/bin/env lua-any | |
| 2 -- Lua-Versions: 5.3 5.2 5.1 | |
| 3 -- traceback to errors.err for vim -q | |
| 4 local path_sep = package.config:sub(1,1); | |
| 5 for line in io.lines() do | |
| 6 local src, err = line:match("%s*(%S+)(:%d+: .*)") | |
| 7 if src then | |
| 8 src = src:gsub("\\", path_sep); | |
| 9 local cut = src:match("/()core/") | |
| 10 or src:match("/()net/") | |
| 11 or src:match("/()util/") | |
| 12 or src:match("/()modules/") | |
| 13 or src:match("/()plugins/") | |
| 14 or src:match("/()prosody[ctl]*$") | |
| 15 if cut then | |
| 16 src = src:sub(cut); | |
| 17 end | |
| 18 src = src:gsub("^modules/", "plugins/") | |
| 19 io.write(src, err, "\n"); | |
| 20 end | |
| 21 end |
