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 @@ -15,25 +15,27 @@ with wydawca. If not, see <http://www.gnu.org/licenses/>. */ static struct obstack pp_cmd_stack; static int pp_cmd_stack_init; static gl_list_t source_list; +static gl_list_t tag_list; static bool source_eq (const void *elt1, const void *elt2) { return strcmp ((const char *)elt1, (const char *)elt2) == 0; } int enabled_spool_p (const struct spool *spool) { - if (!source_list) - return 1; - return !!gl_list_search (source_list, spool->source_dir); + if (source_list || tag_list) + return (source_list && gl_list_search (source_list, spool->source_dir)) + || (tag_list && gl_list_search (tag_list, spool->tag)); + return 1; } OPTIONS_BEGIN(gnu, "wydawca", [<wydawca synchronizes files from a set of upload directories with the corresponding distribution sites>], [<UID [UID...]>]) @@ -58,33 +60,67 @@ OPTION(dry-run,n,, BEGIN log_to_stderr = 1; debug_level++; dry_run_mode = 1; END +OPTION(cron,,, + [<force cron mode>]) +BEGIN + cron_option = 1; + log_to_stderr = 0; +END + +OPTION(force,,, + [<force start up even if the pid file already exists>]) +BEGIN + force_startup = 1; +END + +OPTION(foreground,,, + [<foreground mode>]) +BEGIN + foreground_option = 1; +END + +OPTION(single-process,,, + [<single process mode>]) +BEGIN + single_process_option = 1; +END + OPTION(config-file,c,FILE, [<use FILE instead of the default configuration>]) BEGIN conffile = optarg; END +OPTION(spool,S,TAG, + [<process only spool with the given tag>]) +BEGIN + if (!tag_list) + tag_list = gl_list_create_empty (&gl_linked_list_implementation, + source_eq, NULL, + NULL, false); + gl_list_add_last (tag_list, optarg); +END + OPTION(source,s,SOURCE-DIR, [<process only spool with the given source (may be used multiple times)>]) BEGIN if (!source_list) source_list = gl_list_create_empty (&gl_linked_list_implementation, source_eq, NULL, NULL, false); gl_list_add_last (source_list, optarg); END GROUP(Logging) -OPTION(cron,,, - [<log to syslog>]) -ALIAS(syslog) +OPTION(syslog,,, + [<log to syslog>]) BEGIN log_to_stderr = 0; END OPTION(stderr,e,, [<log to stderr>]) |