aboutsummaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorCarlhuda <carlhuda@engineyard.com>2010-08-13 16:08:14 -0700
committerCarlhuda <carlhuda@engineyard.com>2010-08-13 16:08:14 -0700
commit6e2d9347be6bd07593377edba5fe4385882eddae (patch)
tree6966255ec3285a090e552067b2638e7ba1c1de23 /Rakefile
parent5bad31427af192df5ec97ccc69a2e4471bc6cdb0 (diff)
downloadbundler-6e2d9347be6bd07593377edba5fe4385882eddae.tar.gz
Move the man pages to the bundler repository and write a build task to convert them into roff and txt format.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Rakefile b/Rakefile
index 0ae1307c..b424c4d6 100644
--- a/Rakefile
+++ b/Rakefile
@@ -96,6 +96,33 @@ rescue LoadError
end
end
+namespace :man do
+ directory "lib/bundler/man"
+
+ Dir["man/*.ronn"].each do |ronn|
+ basename = File.basename(ronn, ".ronn")
+ roff = "lib/bundler/man/#{basename}"
+
+ file roff => ["lib/bundler/man", ronn] do
+ sh "ronn --roff --pipe #{ronn} > #{roff}"
+ end
+
+ file "#{roff}.txt" => roff do
+ sh "groff -Wall -mtty-char -mandoc -Tascii #{roff} | col -b > #{roff}.txt"
+ end
+
+ task :build => "#{roff}.txt"
+ end
+end
+
+desc "Build the man pages"
+task :build => "man:build"
+
+desc "Clean up from the built man pages"
+task :clean do
+ rm_rf "lib/bundler/man"
+end
+
begin
require 'rake/gempackagetask'
rescue LoadError