diff --git a/src/step.rs b/src/step.rs index 9405b2df..4bbd476a 100644 --- a/src/step.rs +++ b/src/step.rs @@ -116,6 +116,7 @@ pub enum Step { Pipxu, Pixi, Pkg, + Pkgfile, Pkgin, PlatformioCore, Pnpm, @@ -457,6 +458,11 @@ impl Step { #[cfg(target_os = "android")] runner.execute(*self, "Termux Packages", || android::upgrade_packages(ctx))? } + Pkgfile => + { + #[cfg(target_os = "linux")] + runner.execute(*self, "pkgfile", || linux::run_pkgfile(ctx))? + } Pkgin => { #[cfg(unix)] @@ -719,6 +725,7 @@ pub(crate) fn default_steps() -> Vec { Waydroid, AutoCpufreq, CinnamonSpices, + Pkgfile, ]); #[cfg(target_os = "freebsd")] diff --git a/src/steps/os/linux.rs b/src/steps/os/linux.rs index 1e926e1f..e0b20cd4 100644 --- a/src/steps/os/linux.rs +++ b/src/steps/os/linux.rs @@ -683,6 +683,15 @@ pub fn run_pacstall(ctx: &ExecutionContext) -> Result<()> { upgrade_cmd.arg("-Up").status_checked() } +pub fn run_pkgfile(ctx: &ExecutionContext) -> Result<()> { + let sudo = ctx.require_sudo()?; + let pkgfile = require("pkgfile")?; + + print_separator("pkgfile"); + + sudo.execute(ctx, pkgfile)?.arg("--update").status_checked() +} + pub fn run_packer_nu(ctx: &ExecutionContext) -> Result<()> { let nu = require("nu")?; let packer_home = HOME_DIR.join(".local/share/nushell/packer");