bin/sup-import-dump in sup-0.22.1 vs bin/sup-import-dump in sup-0.23
- old
+ new
@@ -1,19 +1,19 @@
#!/usr/bin/env ruby
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
require 'uri'
-require 'trollop'
+require 'optimist'
require "sup"
PROGRESS_UPDATE_INTERVAL = 15 # seconds
class AbortExecution < SystemExit
end
-opts = Trollop::options do
+opts = Optimist::options do
version "sup-import-dump (sup #{Redwood::VERSION})"
banner <<EOS
Imports message state previously exported by sup-dump into the index.
sup-import-dump operates on the index only, so the messages must have already
been added using sup-sync. If you need to recreate the index, see sup-sync
@@ -34,11 +34,11 @@
opt :dry_run, "Don't actually modify the index. Probably only useful with --verbose.", :short => "-n"
opt :version, "Show version information", :short => :none
conflicts :ignore_missing, :warn_missing, :abort_missing
end
-Trollop::die "No dump file given" if ARGV.empty?
-Trollop::die "Extra arguments given" if ARGV.length > 1
+Optimist::die "No dump file given" if ARGV.empty?
+Optimist::die "Extra arguments given" if ARGV.length > 1
dump_name = ARGV.shift
missing_action = [:ignore_missing, :warn_missing, :abort_missing].find { |x| opts[x] } || :abort_missing
Redwood::start
index = Redwood::Index.init