diff options
| author | onefang | 2019-09-30 01:34:41 +1000 |
|---|---|---|
| committer | onefang | 2019-09-30 01:34:41 +1000 |
| commit | 77714e6d30afa3fedabf168f3ed5299decc6f44d (patch) | |
| tree | 03da6314194cb83ee694d7cc904b6ff03f436537 | |
| parent | Remove some left overs. (diff) | |
| download | apt-panopticon-77714e6d30afa3fedabf168f3ed5299decc6f44d.zip apt-panopticon-77714e6d30afa3fedabf168f3ed5299decc6f44d.tar.gz apt-panopticon-77714e6d30afa3fedabf168f3ed5299decc6f44d.tar.bz2 apt-panopticon-77714e6d30afa3fedabf168f3ed5299decc6f44d.tar.xz | |
Remove excess space at end of mirror base URLs from mirror_list.txt.
Diffstat (limited to '')
| -rwxr-xr-x | mirror-checker.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mirror-checker.lua b/mirror-checker.lua index 8634e3a..c704bf5 100755 --- a/mirror-checker.lua +++ b/mirror-checker.lua | |||
| @@ -486,6 +486,10 @@ if 0 < #arg then | |||
| 486 | W("slash at end of path! " .. arg[1]) | 486 | W("slash at end of path! " .. arg[1]) |
| 487 | arg[1] = arg[1]:sub(1, -2) | 487 | arg[1] = arg[1]:sub(1, -2) |
| 488 | end | 488 | end |
| 489 | if " " == arg[1]:sub(-1, -1) then | ||
| 490 | W("space at end of path! " .. arg[1]) | ||
| 491 | arg[1] = arg[1]:sub(1, -2) | ||
| 492 | end | ||
| 489 | local pu = url.parse("http://" .. arg[1]) | 493 | local pu = url.parse("http://" .. arg[1]) |
| 490 | if nil ~= arg[2] then | 494 | if nil ~= arg[2] then |
| 491 | logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. "_" .. arg[2] .. ".log", "a+") | 495 | logFile, e = io.open("results/mirror-checker-lua_" .. pu.host .. "_" .. arg[2] .. ".log", "a+") |
| @@ -528,6 +532,10 @@ else | |||
| 528 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) | 532 | W("slash at end of BaseURL in mirror_list.txt! " .. m.BaseURL) |
| 529 | m.BaseURL = m.BaseURL:sub(1, -2) | 533 | m.BaseURL = m.BaseURL:sub(1, -2) |
| 530 | end | 534 | end |
| 535 | if " " == m.BaseURL:sub(-1, -1) then | ||
| 536 | W("space at end of BaseURL in mirror_list.txt! " .. m.BaseURL) | ||
| 537 | m.BaseURL = m.BaseURL:sub(1, -2) | ||
| 538 | end | ||
| 531 | local pu = url.parse("http://" .. m.BaseURL) | 539 | local pu = url.parse("http://" .. m.BaseURL) |
| 532 | checkHost(m.BaseURL) | 540 | checkHost(m.BaseURL) |
| 533 | checkExes("mirror-checker.lua " .. sendArgs) | 541 | checkExes("mirror-checker.lua " .. sendArgs) |
