1 --- ./collect_diffs.rb~ 2004-12-10 01:51:21.000000000 +0200
2 +++ ./collect_diffs.rb 2005-02-15 23:09:26.000000000 +0200
4 [ "--to", "-t", GetoptLong::REQUIRED_ARGUMENT ],
5 [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
6 [ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
7 - [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ]
8 + [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ],
9 + [ "--charset", GetoptLong::REQUIRED_ARGUMENT ]
12 # arguments to pass though to 'cvsspam.rb'
13 $passthroughArgs = Array.new
14 opts.each do |opt, arg|
15 - if ["--to", "--config", "--from"].include?(opt)
16 + if ["--to", "--config", "--from", "--charset"].include?(opt)
17 $passthroughArgs << opt << arg
19 if ["--debug"].include?(opt)
20 --- ./cvsspam.rb~ 2005-02-15 23:23:15.000000000 +0200
21 +++ ./cvsspam.rb 2005-02-15 23:22:24.000000000 +0200
23 $repository_name = nil
24 # 2MiB limit on attached diffs,
25 $mail_size_limit = 1024 * 1024 * 2
31 [ "--to", "-t", GetoptLong::REQUIRED_ARGUMENT ],
32 [ "--config", "-c", GetoptLong::REQUIRED_ARGUMENT ],
33 [ "--debug", "-d", GetoptLong::NO_ARGUMENT ],
34 - [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ]
35 + [ "--from", "-u", GetoptLong::REQUIRED_ARGUMENT ],
36 + [ "--charset", GetoptLong::REQUIRED_ARGUMENT ]
39 opts.each do |opt, arg|
41 $config = arg if opt=="--config"
42 $debug = true if opt=="--debug"
43 $from_address = arg if opt=="--from"
44 + # must use different variable as the config is readed later.
45 + $arg_charset = arg if opt == "--charset"
49 @@ -1227,6 +1231,10 @@
50 blah("Config file '#{$config}' not found, ignoring")
53 +if $arg_charset != nil
54 + $charset = $arg_charset
58 fail "No email recipients defined"