]> gitweb.michael.orlitzky.com - mailshears.git/blobdiff - bin/mailshears
Fixed an array-nesting bug.
[mailshears.git] / bin / mailshears
index fc20dd3b4b7302ce536e90210d87cad474ad1e34..d34ce54f719749df9ceb78e5625123589b5ad2e4 100755 (executable)
@@ -63,9 +63,26 @@ end
 
 # Figure out which addresses are in the filesystem, but not in the
 # database.
-difference = [fs_accts - db_accts]
+difference = fs_accts - db_accts
 
 # Don't output any unnecessary junk. Cron might mail it to someone.
 if difference.size > 0
+
+  # The header that we output before the list of accounts.
+  # Just the path of this script, and the current time.
+  header = "#{$0}, "
+  
+  current_time = Time.now()
+  if current_time.respond_to?(:iso8601)
+    # Somehow this method is missing on some machines.
+    header += current_time.iso8601.to_s
+  else
+    # Fall back to whatever this looks like.
+    header += current_time.to_s
+  end
+  
+  puts header
+  puts '-' * header.size # Underline the header.
   puts difference
+  puts ""
 end