Software / code / prosody
Comparison
tools/tb2err @ 13065:ab546c5977ed
tools/tb2err: Rewrite prosody-modules paths to ../modules
This assumes you have community modules in ../modules as I do
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sat, 08 Apr 2023 12:55:08 +0200 |
| parent | 13064:b172db27ffed |
| child | 13066:4aa4a51a7a77 |
comparison
equal
deleted
inserted
replaced
| 13064:b172db27ffed | 13065:ab546c5977ed |
|---|---|
| 9 src = src:gsub("\\", path_sep); | 9 src = src:gsub("\\", path_sep); |
| 10 local cut = src:match("/()core/") | 10 local cut = src:match("/()core/") |
| 11 or src:match("/()net/") | 11 or src:match("/()net/") |
| 12 or src:match("/()util/") | 12 or src:match("/()util/") |
| 13 or src:match("/()modules/") | 13 or src:match("/()modules/") |
| 14 or src:match("/()prosody%-modules/") | |
| 14 or src:match("/()plugins/") | 15 or src:match("/()plugins/") |
| 15 or src:match("/()prosody[ctl]*$") | 16 or src:match("/()prosody[ctl]*$") |
| 16 if cut then | 17 if cut then |
| 17 src = src:sub(cut); | 18 src = src:sub(cut); |
| 18 end | 19 end |
| 20 src = src:gsub("prosody%-modules/", "../modules/") | |
| 19 src = src:gsub("^modules/", "plugins/") | 21 src = src:gsub("^modules/", "plugins/") |
| 20 io.write(src, err, "\n"); | 22 io.write(src, err, "\n"); |
| 21 end | 23 end |
| 22 end | 24 end |