#!/usr/bin/ruby require 'fileutils' require 'yaml' base = File.expand_path(File.dirname(__FILE__)) tmp = File.join(base, 'tmp') FileUtils.rm_rf(tmp) FileUtils.mkdir_p(tmp) # target maildir maildir = File.join(tmp,'Mail') FileUtils.mkdir_p(File.join(maildir, 'new')) FileUtils.mkdir_p(File.join(maildir, 'cur')) FileUtils.mkdir_p(File.join(maildir, 'tmp')) cache = File.join(tmp, 'cache') case ARGV.length when 0 config_data = <