From ea3340beb73ad10cdf605dc6185ccf52f4d8e136 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 18 Aug 2011 21:46:20 +0000 Subject: wrongdoc: add usage info when erroring I forgot how to use it myself --- bin/wrongdoc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/wrongdoc b/bin/wrongdoc index d33feda..5e6bd36 100644 --- a/bin/wrongdoc +++ b/bin/wrongdoc @@ -1,5 +1,6 @@ #!/usr/bin/env ruby -usage = "Usage: #{File.basename($0)} [prepare]" +tasks = %w(prepare release_notes release_changes all) +usage = "Usage: #{File.basename($0)} [#{tasks.join('|')}]" $stderr.sync = $stdout.sync = true require 'wrongdoc' opts = Wrongdoc.config @@ -16,5 +17,6 @@ when "all" Wrongdoc::Merge.new(opts).run Wrongdoc::Final.new(opts, ARGV[1]).run else - abort "#{$0.inspect} #{ARGV.inspect} not understood" + warn "#{$0.inspect} #{ARGV.inspect} not understood" + abort usage end -- cgit v1.2.3-24-ge0c7