From 7b32e20b96758f9e65cf78443520890214fdc2cb Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Mon, 16 Aug 2021 16:26:29 +0200 Subject: Add option to download packages by name regex This patch adds a feature so that we can download sources for all packages matching a regex. For example butido source download --matching "perl5.34.0-.*" for downloading all packages where their name matches "perl5.34.0-.*". Signed-off-by: Matthias Beyer --- src/cli.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/cli.rs') diff --git a/src/cli.rs b/src/cli.rs index 0da6745..2f58a6d 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -841,6 +841,20 @@ pub fn cli<'a>() -> App<'a> { .long("force") .about("Overwrite existing cache entry") ) + + .arg(Arg::new("matching") + .required(false) + .multiple(false) + .long("matching") + .takes_value(true) + .value_name("REGEX") + .about("Download all packages matching a regex with their name") + ) + + .group(ArgGroup::new("download-one-or-many") + .args(&["package_name", "matching"]) + .required(true) + ) ) .subcommand(App::new("of") .version(crate_version!()) -- cgit v1.2.3