]>
Commit | Line | Data |
---|---|---|
32d7fd4f ER |
1 | --- ./collect_diffs.rb~ 2004-12-10 01:51:21.000000000 +0200 |
2 | +++ ./collect_diffs.rb 2005-02-15 23:09:26.000000000 +0200 | |
3 | @@ -357,13 +357,14 @@ | |
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 ] | |
10 | ) | |
11 | ||
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 | |
18 | end | |
19 | if ["--debug"].include?(opt) | |
8c7fa92f ER |
20 | --- ./cvsspam.rb~ 2005-02-15 23:23:15.000000000 +0200 |
21 | +++ ./cvsspam.rb 2005-02-15 23:22:24.000000000 +0200 | |
32d7fd4f ER |
22 | @@ -1170,6 +1170,7 @@ |
23 | $repository_name = nil | |
24 | # 2MiB limit on attached diffs, | |
25 | $mail_size_limit = 1024 * 1024 * 2 | |
26 | +$arg_charset = nil | |
27 | ||
28 | require 'getoptlong' | |
29 | ||
30 | @@ -1177,7 +1178,8 @@ | |
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 ], | |
8c7fa92f | 36 | + [ "--charset", GetoptLong::REQUIRED_ARGUMENT ] |
32d7fd4f ER |
37 | ) |
38 | ||
39 | opts.each do |opt, arg| | |
40 | @@ -1185,6 +1187,8 @@ | |
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" | |
46 | end | |
47 | ||
48 | ||
49 | @@ -1227,6 +1231,10 @@ | |
50 | blah("Config file '#{$config}' not found, ignoring") | |
51 | end | |
52 | ||
53 | +if $arg_charset != nil | |
54 | + $charset = $arg_charset | |
55 | +end | |
56 | + | |
57 | if $recipients.empty? | |
58 | fail "No email recipients defined" | |
59 | end |