diff options
| author | Randy Palamar <randy@rnpnr.xyz> | 2024-02-08 05:54:13 -0700 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2024-02-08 16:12:05 -0800 |
| commit | 59de97e9412dab937702d9d9d1f91fa6c6fcb562 (patch) | |
| tree | 49c0d9fbf1d2abf91ee15d2dffa5fc5d8432ce35 | |
| parent | 1a287f0fbda34a390cf85eb1e16c5e1f6c6871a9 (diff) | |
man: don't duplicate section extension
| -rw-r--r-- | ninja.lua | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -494,15 +494,15 @@ function man(srcs, section) local base = src:match('[^/]*$') local ext = base:match('%.([^.]*)$') - if section then - if ext then base = base:sub(1, -(#ext + 2)) end - ext = section - end + if ext then base = base:sub(1, -(#ext + 2)) end + if section then ext = section end + local path = 'share/man/man'..ext..'/'..base..'.'..ext if config.gzman ~= false then build('gzip', out, src) src = out + path = path..'.gz' end - file('share/man/man'..ext..'/'..base..'.'..ext, '644', src) + file(path, '644', src) end end |
