You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by Sam Ruby <ru...@apache.org> on 2015/12/13 17:05:30 UTC
[whimsy.git] [1/1] Commit 291b73e: make fetch1 only fetch 1
Commit 291b73e874251966f0f64978f5e16341457e4505:
make fetch1 only fetch 1
Branch: refs/heads/secmail
Author: Sam Ruby <ru...@intertwingly.net>
Committer: Sam Ruby <ru...@intertwingly.net>
Pusher: rubys <ru...@apache.org>
------------------------------------------------------------
www/secmail/parsemail.rb | ++++ ---
------------------------------------------------------------
7 changes: 4 additions, 3 deletions.
------------------------------------------------------------
diff --git a/www/secmail/parsemail.rb b/www/secmail/parsemail.rb
index c2821d9..952da00 100644
--- a/www/secmail/parsemail.rb
+++ b/www/secmail/parsemail.rb
@@ -19,11 +19,12 @@
Dir.chdir File.dirname(File.expand_path(__FILE__))
-if ARGV.include? '--fetch' or not Dir.exist? database
- system "rsync -av --no-motd --delete --exclude='*.yml' #{SOURCE}/ #{ARCHIVE}/"
-elsif ARGV.include? '--fetch1'
+if ARGV.include? '--fetch1'
month = Time.now.strftime('%Y%m')
+ Dir.mkdir ARCHIVE unless Dir.exist? ARCHIVE
system "rsync -av --no-motd #{SOURCE}/#{month} #{ARCHIVE}/"
+elsif ARGV.include? '--fetch' or not Dir.exist? database
+ system "rsync -av --no-motd --delete --exclude='*.yml' #{SOURCE}/ #{ARCHIVE}/"
end
# scan each mailbox for updates