Commit 291b73e874251966f0f64978f5e16341457e4505:
make fetch1 only fetch 1
Branch: refs/heads/secmail
Author: Sam Ruby <[email protected]>
Committer: Sam Ruby <[email protected]>
Pusher: rubys <[email protected]>
------------------------------------------------------------
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