diff options
author | Carlhuda <carlhuda@engineyard.com> | 2010-08-13 16:08:14 -0700 |
---|---|---|
committer | Carlhuda <carlhuda@engineyard.com> | 2010-08-13 16:08:14 -0700 |
commit | 6e2d9347be6bd07593377edba5fe4385882eddae (patch) | |
tree | 6966255ec3285a090e552067b2638e7ba1c1de23 /Rakefile | |
parent | 5bad31427af192df5ec97ccc69a2e4471bc6cdb0 (diff) | |
download | bundler-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-- | Rakefile | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 |