diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-16 16:26:29 +0200 |
---|---|---|
committer | Matthias Beyer <matthias.beyer@atos.net> | 2021-08-16 16:26:31 +0200 |
commit | 7b32e20b96758f9e65cf78443520890214fdc2cb (patch) | |
tree | 6c9bcf138c141306c77b1beac5a081c3a24d4e53 /src/cli.rs | |
parent | 2d4945938be440411e43c3440a368df0f70e5810 (diff) |
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 <matthias.beyer@atos.net>
Diffstat (limited to 'src/cli.rs')
-rw-r--r-- | src/cli.rs | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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!()) |