From ccdd089f46cf38f32fb1d36e2bf78daf7d589b15 Mon Sep 17 00:00:00 2001 From: wmorgan Date: Mon, 2 Apr 2007 05:12:40 +0000 Subject: [PATCH] improved help text and now all args must be uris (no more mbox defaulting) git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@367 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- bin/sup-add | 10 ++++------ bin/sup-sync | 13 +++++-------- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/bin/sup-add b/bin/sup-add index caff68d..4894920 100644 --- a/bin/sup-add +++ b/bin/sup-add @@ -12,14 +12,13 @@ $opts = Trollop::options do Adds a source to the Sup source list. Usage: - sup-add [options] + + sup-add [options] + -where + is one or more sources. +where + is one or more source URIs. For mbox files on local disk, use the form: + mbox:, or mbox:// -or simply - For mbox files on remote machines, use the form: mbox+ssh:/// @@ -31,6 +30,7 @@ For IMAP folders, use the form (note no username or password!): imaps:/// # secure, arbitrary folder For Maildir folders, use the form: + maildir:; or maildir:// Options are: @@ -80,8 +80,6 @@ index = Redwood::Index.new index.load ARGV.each do |uri| - uri = "mbox://#{uri}" unless uri =~ %r!://! - if !$opts[:force_new] && index.source_for(uri) say "Already know about #{uri}; skipping." next diff --git a/bin/sup-sync b/bin/sup-sync index f71f6b0..9adecc0 100644 --- a/bin/sup-sync +++ b/bin/sup-sync @@ -43,14 +43,8 @@ Usage: sup-sync [options] * where * is zero or more source URIs. If no sources are given, -sync from all usual sources. - -Supported source URIs: - mbox://, e.g. mbox:///var/spool/mail/me - maildir://, e.g. maildir:///home/me/Maildir - mbox+ssh:/// - imap:///[] - imaps:///[] +sync from all usual sources. All supported source URI schemes can +be seen by running "sup-add --help". Options controlling WHICH messages sup-sync operates on: EOS @@ -199,6 +193,9 @@ begin $stderr.puts "Scanned #{num_scanned}, added #{num_added}, updated #{num_updated} messages from #{source}." $stderr.puts "Restored state on #{num_restored} (#{100.0 * num_restored / num_scanned}%) messages." if num_restored > 0 end +rescue Exception => e + File.open("sup-exception-log.txt", "w") { |f| f.puts e.backtrace } + raise ensure index.save Redwood::finish -- 2.45.2