|
|
@ -13,6 +13,7 @@ pub struct PacmanInstallBuilder {
|
|
|
|
files: Vec<PathBuf>,
|
|
|
|
files: Vec<PathBuf>,
|
|
|
|
as_deps: bool,
|
|
|
|
as_deps: bool,
|
|
|
|
no_confirm: bool,
|
|
|
|
no_confirm: bool,
|
|
|
|
|
|
|
|
quiet: bool,
|
|
|
|
needed: bool,
|
|
|
|
needed: bool,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -21,6 +22,7 @@ impl PacmanInstallBuilder {
|
|
|
|
Self::default()
|
|
|
|
Self::default()
|
|
|
|
.as_deps(options.asdeps)
|
|
|
|
.as_deps(options.asdeps)
|
|
|
|
.no_confirm(options.noconfirm)
|
|
|
|
.no_confirm(options.noconfirm)
|
|
|
|
|
|
|
|
.quiet(options.quiet)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn packages<I: IntoIterator<Item = S>, S: ToString>(mut self, packages: I) -> Self {
|
|
|
|
pub fn packages<I: IntoIterator<Item = S>, S: ToString>(mut self, packages: I) -> Self {
|
|
|
@ -43,6 +45,12 @@ impl PacmanInstallBuilder {
|
|
|
|
self
|
|
|
|
self
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pub fn quiet(mut self, quiet: bool) -> Self {
|
|
|
|
|
|
|
|
self.quiet = quiet;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
self
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[allow(clippy::wrong_self_convention)]
|
|
|
|
#[allow(clippy::wrong_self_convention)]
|
|
|
|
pub fn as_deps(mut self, as_deps: bool) -> Self {
|
|
|
|
pub fn as_deps(mut self, as_deps: bool) -> Self {
|
|
|
|
self.as_deps = as_deps;
|
|
|
|
self.as_deps = as_deps;
|
|
|
@ -70,6 +78,10 @@ impl PacmanInstallBuilder {
|
|
|
|
command = command.arg("--noconfirm")
|
|
|
|
command = command.arg("--noconfirm")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.quiet {
|
|
|
|
|
|
|
|
command = command.arg("--quiet")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if self.as_deps {
|
|
|
|
if self.as_deps {
|
|
|
|
command = command.arg("--asdeps")
|
|
|
|
command = command.arg("--asdeps")
|
|
|
|
}
|
|
|
|
}
|
|
|
|