diff options
Diffstat (limited to 'src/cmdline.opt')
-rw-r--r-- | src/cmdline.opt | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/src/cmdline.opt b/src/cmdline.opt index 53bdd00..b61517b 100644 --- a/src/cmdline.opt +++ b/src/cmdline.opt | |||
@@ -18,6 +18,7 @@ static struct obstack pp_cmd_stack; | |||
18 | static int pp_cmd_stack_init; | 18 | static int pp_cmd_stack_init; |
19 | 19 | ||
20 | static gl_list_t source_list; | 20 | static gl_list_t source_list; |
21 | static gl_list_t tag_list; | ||
21 | 22 | ||
22 | static bool | 23 | static bool |
23 | source_eq (const void *elt1, const void *elt2) | 24 | source_eq (const void *elt1, const void *elt2) |
@@ -28,9 +29,10 @@ source_eq (const void *elt1, const void *elt2) | |||
28 | int | 29 | int |
29 | enabled_spool_p (const struct spool *spool) | 30 | enabled_spool_p (const struct spool *spool) |
30 | { | 31 | { |
31 | if (!source_list) | 32 | if (source_list || tag_list) |
32 | return 1; | 33 | return (source_list && gl_list_search (source_list, spool->source_dir)) |
33 | return !!gl_list_search (source_list, spool->source_dir); | 34 | || (tag_list && gl_list_search (tag_list, spool->tag)); |
35 | return 1; | ||
34 | } | 36 | } |
35 | 37 | ||
36 | OPTIONS_BEGIN(gnu, "wydawca", | 38 | OPTIONS_BEGIN(gnu, "wydawca", |
@@ -61,12 +63,47 @@ BEGIN | |||
61 | dry_run_mode = 1; | 63 | dry_run_mode = 1; |
62 | END | 64 | END |
63 | 65 | ||
66 | OPTION(cron,,, | ||
67 | [<force cron mode>]) | ||
68 | BEGIN | ||
69 | cron_option = 1; | ||
70 | log_to_stderr = 0; | ||
71 | END | ||
72 | |||
73 | OPTION(force,,, | ||
74 | [<force start up even if the pid file already exists>]) | ||
75 | BEGIN | ||
76 | force_startup = 1; | ||
77 | END | ||
78 | |||
79 | OPTION(foreground,,, | ||
80 | [<foreground mode>]) | ||
81 | BEGIN | ||
82 | foreground_option = 1; | ||
83 | END | ||
84 | |||
85 | OPTION(single-process,,, | ||
86 | [<single process mode>]) | ||
87 | BEGIN | ||
88 | single_process_option = 1; | ||
89 | END | ||
90 | |||
64 | OPTION(config-file,c,FILE, | 91 | OPTION(config-file,c,FILE, |
65 | [<use FILE instead of the default configuration>]) | 92 | [<use FILE instead of the default configuration>]) |
66 | BEGIN | 93 | BEGIN |
67 | conffile = optarg; | 94 | conffile = optarg; |
68 | END | 95 | END |
69 | 96 | ||
97 | OPTION(spool,S,TAG, | ||
98 | [<process only spool with the given tag>]) | ||
99 | BEGIN | ||
100 | if (!tag_list) | ||
101 | tag_list = gl_list_create_empty (&gl_linked_list_implementation, | ||
102 | source_eq, NULL, | ||
103 | NULL, false); | ||
104 | gl_list_add_last (tag_list, optarg); | ||
105 | END | ||
106 | |||
70 | OPTION(source,s,SOURCE-DIR, | 107 | OPTION(source,s,SOURCE-DIR, |
71 | [<process only spool with the given source (may be used multiple times)>]) | 108 | [<process only spool with the given source (may be used multiple times)>]) |
72 | BEGIN | 109 | BEGIN |
@@ -79,9 +116,8 @@ END | |||
79 | 116 | ||
80 | GROUP(Logging) | 117 | GROUP(Logging) |
81 | 118 | ||
82 | OPTION(cron,,, | 119 | OPTION(syslog,,, |
83 | [<log to syslog>]) | 120 | [<log to syslog>]) |
84 | ALIAS(syslog) | ||
85 | BEGIN | 121 | BEGIN |
86 | log_to_stderr = 0; | 122 | log_to_stderr = 0; |
87 | END | 123 | END |