bin/sup-tweak-labels in sup-0.10.2 vs bin/sup-tweak-labels in sup-0.11
- old
+ new
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
require 'rubygems'
require 'trollop'
require 'enumerator'
-require "sup"; Redwood::check_library_version_against "0.10.2"
+require "sup"; Redwood::check_library_version_against "0.11"
class Float
def to_s; sprintf '%.2f', self; end
def to_time_s
infinite? ? "unknown" : super
@@ -44,11 +44,10 @@
text <<EOS
Other options:
EOS
- opt :index, "Use this index type ('auto' for autodetect)", :default => "auto"
opt :verbose, "Print message ids as they're processed."
opt :very_verbose, "Print message names and subjects as they're processed."
opt :all_sources, "Scan over all sources.", :short => :none
opt :dry_run, "Don't actually modify the index. Probably only useful with --verbose.", :short => "-n"
opt :version, "Show version information", :short => :none
@@ -59,10 +58,10 @@
remove_labels = opts[:remove].to_set_of_symbols ","
Trollop::die "nothing to do: no labels to add or remove" if add_labels.empty? && remove_labels.empty?
Redwood::start
-index = Redwood::Index.init opts[:index]
+index = Redwood::Index.init
index.lock_interactively or exit
begin
index.load
source_ids = if opts[:all_sources]