diff --git a/src/config.rs b/src/config.rs index 78f433a7..f05ef821 100644 --- a/src/config.rs +++ b/src/config.rs @@ -45,6 +45,7 @@ pub enum Step { Atom, Firmware, Restarts, + Tldr, } #[derive(Deserialize, Default, Debug)] diff --git a/src/main.rs b/src/main.rs index 37ec0950..1b7f71a2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -336,6 +336,10 @@ fn run() -> Result<()> { config.no_retry(), )?; } + + if config.should_run(Step::Tldr) { + execute(&mut report, "TLDR", || unix::run_tldr(run_type), config.no_retry())?; + } } if config.should_run(Step::Rustup) { diff --git a/src/steps/os/unix.rs b/src/steps/os/unix.rs index 94c9c315..395c00ac 100644 --- a/src/steps/os/unix.rs +++ b/src/steps/os/unix.rs @@ -79,6 +79,13 @@ pub fn run_home_manager(run_type: RunType) -> Result<()> { run_type.execute(&home_manager).arg("switch").check_run() } +pub fn run_tldr(run_type: RunType) -> Result<()> { + let tldr = require("tldr")?; + + print_separator("TLDR"); + run_type.execute(&tldr).args(&["--update", "-v"]).check_run() +} + pub fn run_pearl(run_type: RunType) -> Result<()> { let pearl = require("pearl")?; print_separator("pearl");