Add new step pacdiff (#796)
This commit is contained in:
@@ -96,6 +96,7 @@ pub enum Step {
|
||||
Nix,
|
||||
Node,
|
||||
Opam,
|
||||
Pacdiff,
|
||||
Pacstall,
|
||||
Pearl,
|
||||
Pipx,
|
||||
|
||||
@@ -138,6 +138,8 @@ fn run() -> Result<()> {
|
||||
linux::run_etc_update(sudo.as_ref(), run_type)
|
||||
})?;
|
||||
|
||||
runner.execute(Step::Pacdiff, "pacdiff", || linux::run_pacdiff(sudo.as_ref(), run_type))?;
|
||||
|
||||
runner.execute(Step::BrewFormula, "Brew", || {
|
||||
unix::run_brew_formula(&ctx, unix::BrewVariant::Linux)
|
||||
})?;
|
||||
|
||||
@@ -503,6 +503,15 @@ pub fn run_etc_update(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
run_type.execute(sudo).arg(etc_update).check_run()
|
||||
}
|
||||
|
||||
pub fn run_pacdiff(sudo: Option<&PathBuf>, run_type: RunType) -> Result<()> {
|
||||
let sudo = require_option(sudo, String::from("sudo is not installed"))?;
|
||||
let pacdiff = require("pacdiff")?;
|
||||
|
||||
print_separator("pacdiff");
|
||||
|
||||
run_type.execute(sudo).arg(pacdiff).check_run()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user