#!/usr/bin/env ruby =begin ======================================================================= # BINMAN-RAKE 1 2016-02-28 5.1.0 ## NAME binman-rake - run rake(1) tasks from command line ## SYNOPSIS `binman-rake` [*OPTION*]... [*TASK*]... ## DESCRIPTION This program lets you run rake(1) tasks provided by binman(1) without having to create a special file named `Rakefile` that contains the following snippet: require 'binman/rakefile' If no *TASK* is specified, then the `binman` task is run by default. ## TASKS `binman` Runs the `binman:mkd`, `binman:man`, and `binman:web` tasks, in that order. `binman:mkd` or `mkd` Extracts manual page sources embedded in scripts found in your `bin/` directory and saves them as `man/man1/*.1.markdown` files, which can then be rendered as HTML or UNIX manual pages using md2man-rake(1). `binman:man` or `man` Builds UNIX manual pages from scripts found in your `bin/` directory. It also runs the `md2man:man` task, provided by md2man-rake(1), which builds UNIX manual pages from `*.markdown`, `*.mkd`, and `*.md` files found in or beneath the `man/` subdirectory in your working directory. `binman:web` or `web` Builds HTML manual pages from scripts found in your `bin/` directory. It also runs the `md2man:web` task, provided by md2man-rake(1), which builds HTML manual pages from `*.markdown`, `*.mkd`, and `*.md` files found in or beneath the `man/` subdirectory in your working directory. ## OPTIONS `-h` [*PATTERN*], `--help` [*PATTERN*] Show this help manual and optionally search for *PATTERN* regular expression. ... Anything else is passed to rake(1); run `rake --help` for documentation. ## SEE ALSO rake(1), binman(1), md2man-rake(1) =end ========================================================================= require 'binman' BinMan.help # qualify relative task names by prefixing the namespace ARGV.map! {|arg| arg.sub(/\A(mkd|man|web)\Z/, 'binman:\&') } require 'rake' Rake.application.init File.basename(__FILE__) require 'binman/rakefile' task :default => :binman Rake.application.top_level