From: Michael Tremer Date: Fri, 20 Oct 2023 11:25:04 +0000 (+0000) Subject: cli: client: Add option to configure the distribution X-Git-Tag: 0.9.30~1424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=05bee957f8ab5b4201c08841368831873653c270;p=pakfire.git cli: client: Add option to configure the distribution Signed-off-by: Michael Tremer --- diff --git a/src/cli/pakfire-client.c b/src/cli/pakfire-client.c index 9ce6b7632..067882b88 100644 --- a/src/cli/pakfire-client.c +++ b/src/cli/pakfire-client.c @@ -44,11 +44,13 @@ static const char* args_doc = static const char* doc = "The Pakfire Build Service Client Tool"; enum { - OPT_DEBUG = 1, + OPT_DEBUG = 1, + OPT_DISTRO = 2, }; static struct argp_option options[] = { - { "debug", OPT_DEBUG, NULL, 0, "Run in debug mode", 0 }, + { "debug", OPT_DEBUG, NULL, 0, "Run in debug mode", 0 }, + { "distro", OPT_DISTRO, "DISTRO", 0, "Choose the distribution", 0 }, { NULL }, }; @@ -60,6 +62,10 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) { pakfire_ctx_set_log_level(config->ctx, LOG_DEBUG); break; + case OPT_DISTRO: + config->distro = arg; + break; + default: return ARGP_ERR_UNKNOWN; }