Add new step pacdiff (#796)

This commit is contained in:
Manuel Hässig
2021-11-06 19:55:38 +01:00
committed by GitHub
parent 23c9908a6a
commit f70305adcb
3 changed files with 12 additions and 0 deletions

View File

@@ -96,6 +96,7 @@ pub enum Step {
Nix,
Node,
Opam,
Pacdiff,
Pacstall,
Pearl,
Pipx,

View File

@@ -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)
})?;

View File

@@ -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::*;