#!/usr/bin/env ruby 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 case ARGV[0] when "prepare" Wrongdoc::Prepare.new(opts).run when "release_notes" Wrongdoc::Release.notes($stdout, opts) when "release_changes" Wrongdoc::Release.changes($stdout) when "all" Wrongdoc::Prepare.new(opts).run Wrongdoc::Rdoc.new(opts).run Wrongdoc::Merge.new(opts).run Wrongdoc::Final.new(opts, ARGV[1]).run else warn "#{$0.inspect} #{ARGV.inspect} not understood" abort usage end