summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorBodo Tasche <bodo@wannawork.de>2016-10-30 14:10:40 +0100
committerBodo Tasche <bodo@wannawork.de>2016-10-30 18:06:58 +0100
commit8f6970c5465d9aa6d002d2f2b7f03ba82ddde9b5 (patch)
treea0427a25756ed518524d8594c57ae030b6dabcdf /Rakefile
parentced83655d9643e804079a4f2a6967536a4f8b981 (diff)
downloadbundler-8f6970c5465d9aa6d002d2f2b7f03ba82ddde9b5.tar.gz
Move man pages to man folder
The gem-man gem searches for the man pages in the man folder. This pr fixes this and also creates correct names for the manpages. A manpage always needs the section number in the filename.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index 178d481655..149f09f3da 100644
--- a/Rakefile
+++ b/Rakefile
@@ -238,14 +238,15 @@ begin
require "ronn"
namespace :man do
- directory "lib/bundler/man"
+ directory "man"
sources = Dir["man/*.ronn"].map {|f| File.basename(f, ".ronn") }
sources.map do |basename|
ronn = "man/#{basename}.ronn"
- roff = "lib/bundler/man/#{basename}"
+ manual_section = ".1" unless basename =~ /.*(\d+)\Z/
+ roff = "man/#{basename}#{manual_section}"
- file roff => ["lib/bundler/man", ronn] do
+ file roff => ["man", ronn] do
sh "#{Gem.ruby} -S ronn --roff --pipe #{ronn} > #{roff}"
end
@@ -257,9 +258,8 @@ begin
end
task :clean do
- leftovers = Dir["lib/bundler/man/*"].reject do |f|
- basename = File.basename(f).sub(/\.(txt|ronn)/, "")
- sources.include?(basename)
+ leftovers = Dir["man/*"].reject do |f|
+ File.extname(f) == ".ronn" || f == "man/index.txt"
end
rm leftovers if leftovers.any?
end