bin/sup-add in sup-0.1 vs bin/sup-add in sup-0.2
- old
+ new
@@ -91,11 +91,10 @@
say "Already know about #{uri}; skipping."
next
end
parsed_uri = URI(uri)
- Trollop::die "no path component to uri: #{parsed_uri}" unless parsed_uri.path
source =
case parsed_uri.scheme
when "mbox+ssh"
say "For SSH connections, if you will use public key authentication, you may leave the username and password blank."
@@ -107,9 +106,11 @@
Redwood::IMAP.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
when "maildir"
Redwood::Maildir.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
when "mbox"
Redwood::MBox::Loader.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
+ when nil
+ Trollop::die "Sources must be specified with an URI"
else
Trollop::die "Unknown source type #{parsed_uri.scheme.inspect}"
end
say "Adding #{source}..."
index.add_source source