diff --git a/src/step.rs b/src/step.rs index f994db861..053891208 100644 --- a/src/step.rs +++ b/src/step.rs @@ -20,6 +20,7 @@ use crate::utils::hostname; #[strum(serialize_all = "snake_case")] pub enum Step { AM, + Adless, AndroidStudio, AppMan, Aqua, @@ -149,7 +150,6 @@ pub enum Step { Tlmgr, Tmux, Toolbx, - Typst, Uv, Vagrant, Vcpkg, @@ -182,6 +182,7 @@ impl Step { #[cfg(target_os = "linux")] runner.execute(*self, "am", || linux::run_am(ctx))? } + Adless => runner.execute(*self, "adless", || adless::run_adless(ctx))?, AndroidStudio => runner.execute(*self, "Android Studio Plugins", || generic::run_android_studio(ctx))?, AppMan => { @@ -616,7 +617,6 @@ impl Step { #[cfg(target_os = "linux")] runner.execute(*self, "toolbx", || toolbx::run_toolbx(ctx))? } - Typst => runner.execute(*self, "Typst", || generic::run_typst(ctx))?, Uv => runner.execute(*self, "uv", || generic::run_uv(ctx))?, Vagrant => { if ctx.config().should_run(Vagrant) { @@ -761,6 +761,7 @@ pub(crate) fn default_steps() -> Vec { Shell, Tmux, Pearl, + Adless, #[cfg(not(any(target_os = "macos", target_os = "android")))] GnomeShellExtensions, Pyenv, @@ -879,7 +880,6 @@ pub(crate) fn default_steps() -> Vec { Powershell, CustomCommands, Vagrant, - Typst, ]); steps.shrink_to_fit(); diff --git a/src/steps/adless.rs b/src/steps/adless.rs new file mode 100644 index 000000000..2ebbf8b80 --- /dev/null +++ b/src/steps/adless.rs @@ -0,0 +1,15 @@ +use crate::command::CommandExt; +use crate::execution_context::ExecutionContext; +use crate::terminal::print_separator; +use crate::utils::require; +use color_eyre::eyre::Result; + +/// Update Adless hosts list using `sudo adless update` +pub fn run_adless(ctx: &ExecutionContext) -> Result<()> { + let adless = require("adless")?; + + print_separator("Adless"); + + let sudo = ctx.require_sudo()?; + sudo.execute(ctx, &adless)?.arg("update").status_checked() +} diff --git a/src/steps/mod.rs b/src/steps/mod.rs index 9255dd819..586466f1c 100644 --- a/src/steps/mod.rs +++ b/src/steps/mod.rs @@ -1,3 +1,4 @@ +pub mod adless; pub mod containers; pub mod emacs; pub mod generic;