diff options
| -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 |
