5 db = ENV['MOCK_MAILMAN_DB']
7 lists = JSON.load(File.read(db))
9 $stderr.puts "Bad call"
12 emails = (ARGV[1] == '-' ? $stdin : File.open(ARGV[1])).read.split
13 lists[ARGV[2]] = (lists[ARGV[2]] || []) + emails
15 File.open(db, 'w') { |f| f.write(JSON.dump(lists)) }