diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-08-18 21:46:20 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-08-18 21:46:20 +0000 |
commit | ea3340beb73ad10cdf605dc6185ccf52f4d8e136 (patch) | |
tree | 92005ccafb4974de92c959fcb3ead3cd591b5e9d | |
parent | ae6b1e31363d7183f620c28482fc67bc6f6c6e0d (diff) | |
download | wrongdoc-ea3340beb73ad10cdf605dc6185ccf52f4d8e136.tar.gz |
wrongdoc: add usage info when erroring
I forgot how to use it myself
-rw-r--r-- | bin/wrongdoc | 6 |
1 files 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 |