bin/sup-sync-back in sup-0.9.1 vs bin/sup-sync-back in sup-0.10

- old
+ new

@@ -3,11 +3,11 @@ require 'rubygems' require 'uri' require 'tempfile' require 'trollop' require 'enumerator' -require "sup" +require "sup"; Redwood::check_library_version_against "0.10" ## save a message 'm' to an open file pointer 'fp' def save m, fp m.source.each_raw_message_line(m.source_info) { |l| fp.print l } end @@ -45,10 +45,11 @@ opt :move_spam, "Move spam messages to a local mbox file.", :type => String, :short => :none opt :with_dotlockfile, "Specific dotlockfile location (mbox files only).", :default => "/usr/bin/dotlockfile", :short => :none opt :dont_use_dotlockfile, "Don't use dotlockfile to lock mbox files. Dangerous if other processes modify them concurrently.", :default => false, :short => :none + opt :index, "Use this index type ('auto' for autodetect)", :default => "auto" opt :verbose, "Print message ids as they're processed." opt :dry_run, "Don't actually modify the index. Probably only useful with --verbose.", :short => "-n" opt :version, "Show version information", :short => :none conflicts :drop_deleted, :move_deleted @@ -63,10 +64,10 @@ exit end Redwood::start -index = Redwood::Index.init +index = Redwood::Index.init opts[:index] index.lock_interactively or exit deleted_fp, spam_fp = nil unless opts[:dry_run] deleted_fp = File.open(opts[:move_deleted], "a") if opts[:move_deleted]